PROJECT 8.2—USB-Based Microcontroller Input/Output This project is very similar to Project 8.1, except that it includes two-way communication, while in Project 8.1 data to be output on PORTB was sent to the microcontroller. In addition, PORTB data is received from the microcontroller and displayed on the PC. The PC sends two commands to the microcontroller: […]
Continue reading…
Posts by Farahat
Advanced PIC18 Projects—USB Bus Projects:Descriptors
Descriptors All USB devices have a hierarchy of descriptors that describe various features of the device: the manufacturer ID, the version of the device, the version of USB it supports, what the device is, its power requirements, the number and type of endpoints, and so forth. The most common USB descriptors are: • Device descriptors […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:mikroC Language USB Bus Library Functions
mikroC Language USB Bus Library Functions The mikroC language supports a number of functions for USB HID-type communications. Each project based on the USB library should include a descriptor source file which contains vendor ID and name, product ID and name, report length, and other relevant information. To create a descriptor source file we can […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:PIC18 Microcontroller USB Bus Interface
PIC18 Microcontroller USB Bus Interface Some of the PIC18 microcontrollers support USB interface directly. For example, the PIC18F4550 microcontroller contains a full-speed and low-speed compatible USB interface that allows communication between a host PC and the microcontroller. In the USB projects in this chapter we will use the PIC18F4550 microcontroller. Figure 8.8 is an overview […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:USB Bus Communication
USB Bus Communication USB is a host-centric connectivity system where the host dictates the use of the USB bus. Each device on the bus is assigned a unique USB address, and no slave device can assert a signal on the bus until the host asks for it. When a new USB device is plugged into […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:USB States
USB States Some of the USB bus states are: Idle: The bus is in idle state when the pulled-up line is high and the other line is low. This is the state of the lines before and after a packet transmission. Detached: When no device is connected to the bus, the host sees both lines […]
Continue reading…
Advanced PIC18 Projects—USB Bus Projects:Speed Identification on the Bus
The Universal Serial Bus (USB) is one of the most common interfaces used in electronic consumer products today, including PCs, cameras, GPS devices, MP3 players, modems, printers, and scanners, to name a few. The USB was originally developed by Compaq, Microsoft, Intel, and NEC, and later by Hewlett-Packard, Lucent, and Philips as well. These companies […]
Continue reading…
Advanced PIC18 Projects—SD Card Projects:Temperature Logger
PROJECT 7.4—Temperature Logger This project shows the design of a temperature data logger system. The ambient temperature is read every ten seconds and stored in a file on an SD card. The program is menu-based, and the user is given the option of: • Sending the saved file contents to a PC • Saving the […]
Continue reading…
Advanced PIC18 Projects—SD Card Projects:Read CID Register and Display on a PC Screen
PROJECT 7.1—Read CID Register and Display on a PC Screen In this project a SD card is interfaced to a PIC18F452-type microcontroller. The serial output port of the microcontroller is connected to the serial input port (e.g., COM1) of a PC. The microcontroller reads the contents of the card CID register and sends this data […]
Continue reading…
Advanced PIC18 Projects—SD Card Projects:Read/Write to SD Card Sectors
PROJECT 7.2—Read/Write to SD Card Sectors The hardware of this project is the same as for Project 7.1 (i.e., as shown in Figure 7.8). In this project, sector 10 of the SD card is filled with “C” characters, and then this sector is read and the card data is sent to the UART. The program […]
Continue reading…