PIC18F4550 USB Development Board Project CCS C

| August 30, 2023 Updated
PIC18F4550 USB Development Board Project CCS C

A quality test kit for the Microchip PIC18F series microcontroller PIC18F4550 will provide great convenience to test your software, usb sd / mmc card inputs, lcd connection, etc. exists. CCS C software usb driver file and protel pcb file are given.

PIC18F4550 USB Development Board PCB

This is a learning support project for using a PIC microcontroller connected to a USB port as a guide for developing a wide variety of USB microcontroller projects.

When it comes to interfaces with external computing devices, developers will be familiar with a printer port or parallel port, serial port, or even a joystick port. These three ports are greatly appreciated by microcontroller enthusiasts and experimenters. However, in contemporary computers there is another very popular interface which is the USB (Universal Serial Port) port, and modern laptops usually do not have a serial port. Therefore, data transmission with external devices is completely dependent on the USB port.

For experimenters, it is not easy to connect the microcontroller directly to the USB port (not considering the use of a USB to RS-232 converter, which allows the microcontroller to communicate in the same way as a serial port). Because communication via USB port is a data communication in a dedicated bus system. It has a layered communication model or protocol. This is because there are only two USB port signal cables. But it can connect up to 128 devices (usually a computer) with a communication speed of up to 480 megabits per second. This is completely different from an RS-232 serial or parallel port.

That is why modern microcontroller manufacturers are trying to facilitate more and more microcontroller developers. By putting a USB port interface module in it, or at least providing an example of how they would use their microcontroller to use a USB port (that’s how it should be), which of course takes knowledge and understanding.

For those who want to further develop this project. He should also have knowledge about microcontroller programming in C language, because in this project commands were written in C language to control the operation of the microcontroller. Here, he should use CCS C Compiler and also have basic knowledge of writing applications on computer. Because the development of microcontrollers and automatic control systems via USB port is essential for both developers to develop programs for microcontrollers. and computer

pic18f4550

Principles and reasons

USB stands for Universal Serial Bus. Translated directly, this means: general purpose serial bus The technical specifications are summarized below.

1. Can connect multiple devices Up to 127 connectors (excluding the main device) are integrated into a single connector.

2. There is no system resource access conflict (IRQ).

3. Check connections and set automatic functions while the machine is running.

4. Data transfer rates are based on standards. Details are as follows:

The USB 1.0/1.1 standard has a speed as low as 1.5 megabits per second (Mbit/s) and a full speed of 12 megabits per second (Mbit/s).

The USB 2.0 standard has 1 level higher speed (high speed) transfer rate with speeds up to 480 Mbps.

5. A DC voltage of +5V is also provided at the pin of the USB port. This allows peripherals to use less power. The voltage from this USB port can be used as a power source to work. However, the total current should not exceed 100 mA.

Data transfer in USB 1.0/1.1 bus

USB is the data transmission that every device uses. The signal must be combined into a single pair of wires. That is, every device connected to the Bus must send data to avoid data conflicts. Doing within a certain time will only have information that works in one direction. Data cannot be received and transmitted simultaneously.

The timing of USB data transmission is controlled from the host (host), a computer that is the common point of all connected devices. Data transmission is defined as frames, every 1 millisecond (ms) there will be a data transmission frame. Each frame is divided by the host into packets (packets) starting from each frame.

A Frame Start signal, or SOF (Start of Frame), so all devices know when to start the frame. After that, the host will start sending or receiving various information. Addresses inside the bus by various devices in order of importance should only operate on the timing specified by the host. Sending data back to the host can only be done when requested or requested by the host.

schematic-pic18f4550-usb-connection-experiment-kit-lcd-sd-mmc-card

The necessary software and hardware for USB systems are as follows.

Software

1. USB device drivers

2. USB drive (USB drive)

3. Host controller driver (USB host controller driver)

Equipment

1. USB host controller (USB host controller) / root hub (root hub) Simply put, this is a computer.

2. If the number of USB ports on the computer is large enough, a USB hub may not be available.

3. USB devices There are many USB devices, printers, scanners, hard disks, modems, mice, keyboards, and of course the test board presented here is one of the USB devices.

The main microcontroller used in this project is the PIC18F4550 from Microchip. Switchable between USB ports supporting both USB1.0/1.1 and 2.0

Starting from the power supply part to be taken from an external power source (Adapter etc.) it will be fed through SW4 through CON3 to turn the power supply on/off to power the second circuit. After SW4 is turned on, the voltage is fed to BD1 which acts as the Bridge Rectifier so that the user is out of polarity. can independently supply an external voltage. (But pay attention to the voltage level) After receiving the voltage will be lowered to 5 volts by IC1 and since this project can choose to accept voltage from two sources, the voltage is voltage from CON3 and the user’s USB port. You can choose from JP1. If you want to use the power supply from the USB port, do not accept voltage from CON3 but care should be taken that the total current does not exceed 100 mA. One of the features of the machine is that it can be connected to JP1. SD/MMC Card Reader and Writer. This requires a voltage of 3.3 volts, so IC2 must be used to reduce the voltage from 5 volts to strong. voltage 3.3 volts for other components To use in the experiment, the author needs to divide it into four parts as follows.

1. Connecting to the LCD Using Port D of the microcontroller (IC3) to be connected in 4-bit mode, you can adjust the density of the characters appearing on the LCD screen with VR3, and a 10 ohm resistor is connected to pin 15 of the LCD. It is given to the backlight (Black Light) of the LCD.

2. Connection with SW2 and SW3, these two pins are connected by pull-up resistors, so the microcontroller will work in Logic Low state.

3. An experiment involving the use of analog signals in the conversion of digital data. By connecting to a variable resistor, the Author will design two ports (RA0, RA1), an experiment to fetch the reading value to send the data to be displayed on the computer screen.

4. An experiment on ON/OFF control of LEDs (LED1-LED4) connected to ports RB2, RB3, RB4 and RB5 operating in logic low state. For the LED to turn on, the port must have a logic low state, and for the LED to turn off, the port must have a high logic state.

5. To generate an audio output via a buzzer controlled by Port RE2, it is necessary to drive the buser via a transistor. Because the current coming from the port of the microcontroller is not enough to drive the busser directly.

6. To read/write SD/MMC memory cards, because SD/MMC memory card pins require no more than 3.3 volts, so a divider resistor is required for read/write reduce pressure outside pin 7 of A

SD/MMC memory card because this pin is used to send data. Therefore, there is no need to connect a voltage attenuation circuit. However, a 10 kohm resistor must be pulled up to 3.3 volts.

a. CS is like Clip Select signal to control contact with SC/MMC board. Returns Logic Low status (Logic Low)

b.MOSI is a signal pin to command and even bring data (Command, Data) to the board.

c.MISO is the signal pin. to receive data sent to the card

d.SCK is the clock pin that will feed the card.

If the user wants to connect additional external devices prepared in the dashboard, it can be added easily. Since the author has already designed two connectors, the first point is CON1, where this port connects to ports RA2, RA3, and RA4, and the other point is CON2, which is connected to ports RC0, RC1 and RC2.

RB6 and RB7 pins are used for programming in the memory of the microcontroller, so this pin is not used in other devices. For programming, it is connected to an RJ-11 (CON4) type connector that can be connected to external programmers or debuggers such as Microchip’s ICD2 or Pickit2 or Innovative X’s programmers. ICDX-30 or PX-800 etc.

For the features of the PIC18F4550, the manufacturer has designed it so that it can be connected to a computer’s USB port. The signal pin is set allowing RC4 port to be D- and RC5 to be D+. This may damage the computer’s USB port.

Pretest

After going through the assembly process of the device on the printed circuit board and checking its correctness until you are sure that there are no errors. Then program the data into the memory of the PIC18F4550 and select the JP1 location on the board. voltage to external power supply or voltage from USB port.In this experiment, an external power supply will be used via CON3. The test procedure can be done as follows.

Turn ON the SW1 (Power Switch) position, notice that the LED (LED6) will light up, indicating that there is voltage in the circuit. (However, if you select the voltage location from the USB port, the location selection will not be effective.) At that moment, the buzzer will “beep” and the LCD will display the message “J.Nut Test USB”. “EVK PIC18F4550” on the first line and the LCD does not work on the second line, try adjusting VR3 to adjust the density of the characters displayed on the LCD. If nothing appears on the screen, disconnect the power source and retest the device.

The next step is to connect the board to the computer using a USB cable. Meanwhile, the user observes the lower right corner of the computer screen. The Windows system will display the message “Hardware New Device” to inform the user to install the driver (Driver) compatible with the card we created. If the driver has been successfully installed.

After the driver is successfully installed. If the computer can communicate with the PIC18F4550 card, LED5 (LED Rdy) will light up, indicating that the card can communicate with the computer. To test the operation on the computer. The author has tested it on the Windows XP operating system and before opening the test file. Since the author uses VC# 2005, some components need to be installed. If any reader has Microsoft Framework 2.0 installed, they can use it. Open the Application EXE file to test the functionality of the motherboard. Details are as follows.

The program the author used to test this has a 4-button Subscript location to select control of the dimming of the four LEDs, i.e. if you click the Subscript in any position. Causes the LED to be in this position Attached and Pressing the Sub-Icon once again, the same position causes that LED to turn off.
You can test the LCD screen test by typing the characters in the SEND TEXT box (it should not exceed 16 characters since the LCD has 16 characters per line) and clicking the “SEND TEXT” button on the second line of the LCD.

Test the operation of the A/D reception (Analog to Digital) by adjusting the left and right rotation of the variable resistors (VR1 and VR2) and observing the bar level change on the computer screen.

Note the bottom box as part of the test conditions for pressing SW1 and SW2. This displays the status message each time the switch is pressed.
To test the busser function The device will be ON/OFF like LED test i.e. if you click the Sub-Icon in any position. Pressing the High and Sub Icon repeatedly in its original position will result in the beeper at that location, the beeper will stop sounding.

Finally, to test SD/MMC card functionality, there is a selectable switch to read SD/MMC card status if there is no SD/MMC card in the socket. If there is a card in the slot, the message “SD/MMC Fail” will be displayed on the LCD screen. The program will read the name and current reading capacity of the SD/MMC card and display it on the LCD.

For the evolution of the realized microcontroller. Whether there is an improvement in speed In matters of communication or other qualities such as memory, if we do not investigate, he can be called a lagging person from other people.

Resistance
1/4 watt 5% resistor
R1,R11,R12 10k 3 pcs
R2,R3 22 2 pcs
R4,R8,R9,R10 3.3k 4 pcs
R5,R6,R7 2.2k 3 pcs
R13 1k 1pc
R14,R21 10 2 pcs
R15-R20 220 6 pcs
VR1-VR3 10k 3 pcs

C1-C4,C7 220uF 16V 5 electrolyte
C5,C6 22pF 50V 2 ceramic
C8 0.1uF 50V 1 polyester
1 C9 47uF 16V electrolyte

Semiconductor devices
1 IC1 7805
1 IC2 1587T33
1 IC3 PIC18F4550
Q1 2N4403 1 pc
D2 1N4148 1pc
BD1 1A 100V round bridge

Other
XTAL1 20MHz crystal x1
SW1,SW2,SW3 3 button switches
SW4 1 x 3-pin slide switch
CON1,CON2 2 5-pin connector
CON3 jack adapter 1 x
CON4 1 RJ-11 connector
CON5 1 USB connector
CON6 1 SD/MMC card socket
LCD1 1 16-pin IDC connector
LED1-LED6 6 red LEDs 3 mm.
BZ1 1 x 5 volt bus

Source: wara.com PIC18F4550 USB board project files alternative link

PIC18F4550 USB Development Board Project CCS C

Password: 320volt.com

Published: 2010/02/09 Tags:



1 Comment “PIC18F4550 USB Development Board Project CCS C

  1. Electronics CircuitsElectronics Circuits

    Active Subwoofer Bass Filter Circuit TDA2030 Amplifer Project

    amplifier tda2030-circuit based on lm1875, tda2040, can be used instead of the tda2030 tda2050 pcb design is quite small volume control potentiometer attached to power supply filter capacitor on the pcb can be used with different bass filter amplifier circuits made with tl074

    Getting the signal from the speaker has another advantage namely allows you to keep a constant volume ratio of the subwoofer to a stereo system. Strengthening the subwoofer channel can be adjusted via a potentiometer. After filtering off the high-frequency signal is amplified by means of the TDA2030, or the like. The board is designed to allow the system to work TDA2030, TDA2040 and TDA2050

    REPLY

Leave a Reply

Your email address will not be published. Required fields are marked *