PIC’ing the MAX3100: Adding USB to a PIC Microcontroller Using the MAX3100 UART using pic microcontroller
Abstract: USB has just become easy to implement. This application note eases equipment designers into USB by allowing them to continue to transmit and receive data using the familiar UART frames of the MAX3100 UART. A UART-to-USB converter IC and operating system driver will take care of all of the USB complexity. The application note describes all of the software and hardware you need in order to transmit and receive data using the MAX3100 over USB.
The UART (universal asynchronous receiver transmitter) has been the standard serial port framer ever since IBM’s original PC motherboard used the Intel 8250 UART. Decades later, the UART continues to be widely used due to its reliability and simplicity.
The universal serial bus (USB) has largely replaced the standard serial port as the way to connect devices to a PC because it is simpler, more foolproof, and faster. But while USB makes connection easier for the user, it presents the designer with additional challenges. Many designers continue to use the UART with the standard serial port, waiting for products that make USB easier to implement. Happily, that day has arrived. A USB interface can now be achieved using the MAX3100 and a UART-to-USB converter. The designer works with the familiar UART frames of the MAX3100 UART and the UART-to-USB converter IC and an operating system driver take care of the complexities of USB.
The MAX3100 is the first UART targeted specifically for microcontroller systems. Its SPI™/QSPI™ compatible interface allows the MAX3100 to be used with almost any microcontroller. The SPI/QSPI interface is ideal because it is easy to implement with either an on-chip SPI/QSPI peripheral or just 4 GPIOs. The MAX3100 supports SPI data rates up to 4.2MHz and its UART supports baud rates up to 230kBd.
This application note eases equipment designers into USB by allowing them to continue to transmit and receive data using standard UART data frames.The information below describes all of the software and hardware you need in order to transmit and receive data using the MAX3100 over USB.
A UART-Based USB Design
The application circuit shown in Figure 1 consists of the MAX3100 UART, a FT232BM UART-to-USB converter, a 93C46 serial EEPROM, and a PIC16F84 microcontroller. Since the PIC16F84 does not have any internal USB or UART peripherals, the MAX3100 makes the perfect external UART peripheral. The program, shown in Listing 1, interfaces the PIC16F84 to the MAX3100 via SPI.
We recommend EasyEDA for electronic circuit design.
From Schematic Drawing to PCB Production, Just Need One Tool
Cheap PCB Prototype: 10 pcs 2 layers only $10, quick delivery, 100% E-test