Oops! It appears that you have disabled your Javascript. In order for you to see this page as it is meant to appear, we ask that you please re-enable your Javascript!

Tag archives for USB CDC

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.

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 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.

Microchip Libraries for Applications

image-103
Microchip Libraries for Applications (MLA) is a collection of Microchip firmware libraries, drivers, demo projects, documentation and utilities for different type of applications including USB, Graphic displays, File I/O (Memory cards), TCP IP, Smartphone and many more. Not all firmware libraries and demo projects from Microchip are distributed in this package; rather, this package includes a few specific libraries that tend to be used together. By distributing libraries that are used often together, Microchip can provide example projects that integrate the use of multiple libraries.

MPLAB® Code Configurator

image-93
The MPLAB® Code Configurator (MCC) is a user friendly Graphical User Interface (GUI) plug-in tool for MPLAB® X IDE which generates easy to understand C code that is inserted into an MPLAB® X project, based on the settings peripherals configurations and selections made in the Graphical User Interface (GUI). The generated code can be used in any application program. When starting out with a new project using Microchip 8-bit microcontrollers, setup of the configuration and all the peripherals can be time consuming, especially for new projects. The MPLAB® Code Configurator simplifies this down to a series of simple graphical selections from the menus within the MCC.