Tag archives for PIC Communication

Interfacing ENC28J60 Ethernet Controller with PIC Microcontroller – XC8

image-793
Ethernet is the leading wired standard for networking as it enables to connect a very large number of computers, microcontrollers and other computer-based equipment to one another. With just a network switch, many different devices can easily communicate with one another with Ethernet, allowing different devices and equipment to be accessed remotely and this also provides a cost-effective and reliable means of remote control and monitoring. For microcontrollers which don't have an integrated Ethernet peripheral, Microchip offers a serial Ethernet chip that can easily be used by any microcontroller with an SPI interface to provide Ethernet capability to the application. The ENC28J60 is a popular 28-pin serial Ethernet chip, 10BASE-T stand alone Ethernet Controller with SPI interface, on board MAC & PHY, 8 Kbytes of Buffer RAM and an SPI serial interface. In this article we will learn how to use the ENC28J60 Ethernet controller with Microchip TCP/IP Lite Stack and MPLAB Code Configurator.

Interfacing ENC28J60 Ethernet Controller with PIC Microcontroller – MikroC

image-253
Ethernet is the leading wired standard for networking as it enables to connect a very large number of computers, microcontrollers and other computer-based equipment to one another. With just a network switch, many different devices can easily communicate with one another with Ethernet, allowing different devices and equipment to be accessed remotely and this also provides a cost-effective and reliable means of remote control and monitoring. For microcontrollers which don't have an integrated Ethernet peripheral, Microchip offers a serial Ethernet chip that can easily be used by any microcontroller with an SPI interface to provide Ethernet capability to the application. The ENC28J60 is a popular 28-pin serial Ethernet chip, 10BASE-T stand alone Ethernet Controller with SPI interface, on board MAC & PHY, 8 Kbytes of Buffer RAM and an SPI serial interface. In this article we will learn how to use the ENC28J60 Ethernet controller with MikroC Pro for PIC SPI Ethernet ENC28J60 Library.

Getting Started with ENC28J60 Ethernet Controller with Microcontrollers

image-153
Ethernet is the leading wired standard for networking as it enables to connect a very large number of computers, microcontrollers and other computer-based equipment to one another. With just a network switch, many different devices can easily communicate with one another with Ethernet, allowing different devices and equipment to be accessed remotely and this also provides a cost-effective and reliable means of remote control and monitoring, home automation, Internet of Things applications and many more. If you are using a microcontroller which does not have an integrated Ethernet peripheral, Microchip offers a serial Ethernet chip that can easily be used by any microcontroller with an SPI interface to provide Ethernet capability to the application. many compilers offer peripheral libraries to get you started in minutes.

Ethernet Communication with PIC Microcontroller

image-158
In this series of PIC Microcontroller Communication, after learning on how PIC Microcontroller Communication with I2C, SPI, RS232 and USB can be achieved, in this article we are going to discuss the concepts of Ethernet Communication with PIC Microcontroller. When it comes to communication involving wires, Ethernet is the leading wired standard for networking as it enables to connect a very large number of computers, microcontrollers and other computer-based equipment to each other. With just a switch, many different devices can easily communicate with one another with Ethernet, allowing devices and equipment to be accessed remotely and provides a cost-effective and reliable means of monitoring or controlling such equipment, for example a person could monitor several vending machines located in different places which can be several kilometers apart from the PC at the conform of your desk. A simple online interface to the vending machines can allow you to monitor everything from the internet.

USB Communication Device Class with PIC Microcontroller – MikroC

image-240
The CDC device class code is "0x02, this class defines various communications over USB. The CDC class can be used to emulate the RS232 serial port (COM Port) and thus creating an easy solution to migrate the application from an old RS232 to the Universal Serial Bus (USB) interface without implementing many changes especially to the PC software. The device will create a virtual COM. The current MikroC Pro for PIC version 6.0.0 does not have a built in USB CDC library in the compiler, but you can download the USB Device Library from LIBSTOCK. This library supports the USB HID Class, the USB CDC Class and the USB Mass Storage Device Class. The file you are going to download has an .mpkg extension. You need the package manager to integrate this USB library into the MikroElekronika compilers. You can download the latest package manager from MikroElekronika website.

USB Serial Communication with PIC Microcontroller – Flowcode

image-317
Many computers especially portable ones do not have a serial port (COM Port) anymore. When a connection to a Personal Computer (PC) is required, a USB is the choice. The Universal Serial Bus (USB) is the widely used interface in electronic consumer products today. Most of electronic devices have at least one USB port on them, this include PCs, cameras, GPS devices, printers and so on. In this article we are going to learn how to set up a serial communication between a microcontroller and a PC using a USB port by creating a virtual COM Port. Some PIC18 microcontrollers support USB interface directly. For example, the PIC18F25K50, PIC18F4450 and PIC18F4550 microcontrollers just to name a few all have a full-speed compatible USB interface that allows communication between a host PC and the microcontroller. The USB bus is a very complex protocol. Flowcode provides a component for USB Serial ,The USB Serial device is used to stream data between a microcontroller and a PC.

USB Human Interface Device Communication with PIC Microcontroller – MikroC

image-242
The HID device class code is "0x03, this class is used for devices operated by human, devices like keyboard, mouse, joystick and so forth. The advantage of HID devices is that, they don't require to install drivers, in most modern operating systems, the device will be detected without any problem. The USB HID protocol allows a personal computer to recognize a USB HID connected to it without the need to create a device driver, this is the same like when you connect a USB optical mouse or a USB keyboard you don't need to install drivers for that. Windows operating system will load the required drivers, all that is needed is to to supply the PC with a descriptor file containing some information from the device like Vendor ID (VID), Product ID (PID), Manufacture name and so forth. MikroC Pro for PIC provides USB HID library that make it easy for a host device to communicate with a slave device on a USB bus.

USB Communication with PIC Microcontroller

image-198
Many computers especially portable ones do not have a serial port (COM Port) anymore. When a connection to a Personal Computer (PC) is required, a USB is the choice. The Universal Serial Bus (USB) is the widely used interface in electronic consumer products today. Most of electronic devices have at least one USB port on them, this include PCs, cameras, GPS devices, printers and so on. Some PIC18 microcontrollers support USB interface directly. 16bits (PIC24) and 32-bits (PIC32) pic microcontrollers have also an embedded USB interface. In this article we will learn how a communication between a host PC and a microcontroller can be achieved with a USB bus.

PIC Microcontroller Communication with I2C Bus – MikroC

image-269
The I2C or Inter-Integrated Circuit is a serial communication and allows multiple devices to communicate with a micocontroller(s) over only two wires. The devices don't have to be identical as long as they support I²C protocol. Communication takes place from the master (PIC) to the individual selected slave only as shown in this illustration, the master sends data to the slave address 2 only. I²C with MikroC Pro for PIC