PIC C18 CCS C USB APPLICATIONS PIC18F4550 PIC18F2550 CIRCUITS

Summary of PIC C18 CCS C USB APPLICATIONS PIC18F4550 PIC18F2550 CIRCUITS


This article details USB-based projects using PIC18F4550 and PIC18F2550 microcontrollers with CCS C and C18 compilers. It covers a USB remote control system for home devices, an HID application for LCD and LED control, stepper motor management via USB, and ADC data acquisition. The guide includes circuit diagrams, server-client communication protocols, and source code availability for these embedded systems.

Parts used in the USB Remote Control Project:

  • PIC18F4550 Microcontroller
  • Relay connected to PORTB
  • USB Device
  • PC Server Software
  • Client Program
  • Port 8090

Parts used in the USB HID LCD & LED Application:

  • PIC18F4550 Microcontroller
  • LED
  • LCD Display
  • Visual C++ 2005 Compiler
  • CCS C Compiler
  • Generic HID Class Driver

Parts used in the USB Stepper Motor Application:

  • PIC18F2550 Microcontroller
  • Bipolar Stepper Motor
  • ADC Inputs AN0
  • ADC Inputs AN1
  • Potentiometer

Parts used in the USB ADC Application:

  • PIC18F2550 Microcontroller
  • Microchip USB Library
  • PC Simulation Program
  • Visual C++
  • CCS C
  • USB 2.0 Bulk Transfer Interface

Previously prepared by @Ahmet ATA `s” Step by Step USB and Applications “share the work I did from the most comprehensive Turkish source USB PIC think about communication. Of electro-techno forum “to tmco” very nice continuation of this project,… Electronics Projects, PIC C18 CCS C USB Applications PIC18F4550 PIC18F2550 Circuits “ccs c examples, microchip projects, microcontroller projects, pic18f2550 projects,

PIC C18 CCS C USB APPLICATIONS PIC18F4550 PIC18F2550 CIRCUITS
PIC C18 CCS C USB APPLICATIONS PIC18F4550 PIC18F2550 CIRCUITS

Previously prepared by @Ahmet ATA `s” Step by Step USB and Applications “share the work I did from the most comprehensive Turkish source USB PIC think about communication. Of electro-techno forum “to tmco” very nice continuation of this project, projects, shared information with the hope to be helpful. Thank you to everyone who contributed

PIC18F4550 USB REMOTE CONTROL

Below I will give you practice in your home via the internet or anywhere else in the Server machine with the device connected to one of the USB ports to connect to any device in your home allows you to control. You have already downloaded the USB Package STEP in the main circuit diagram USB was given in the article. I have given this circuit circuit below do not add enough.

PIC18F4550 USB REMOTE CONTROL
PIC18F4550 USB REMOTE CONTROL

 

The above diagram is only given for the only one device. More set up for three additional devices to the same circuit of pic18f4550 RB1, RB2 and RB3 port should connect to.

USB REMOTE CONTROL SERVER

USB REMOTE CONTROL SERVER
USB REMOTE CONTROL SERVER

When you first run this program if the USB device is not connected to your PC, the program does not make a configuration for connection to a USB device to connect and begin to listen. USB Devices plugged into a PC Server software will detect it and as soon as the connection between the USB device and plug açar.ayn time bağlantısını configure the program and get to listen on port 8090. When a connection arrives, and it accepts commands from the client program that provided the link starts to wait. Normally 4 bytes of data are moved between Server and Client. It is thought the four bytes in the command structure is as follows;

unsigned char CmdBuffer[4];

CmdBuffer[0] = Aygıt İndex'i (Örneğin 0 - 0.Cihaz, 1 - 1.Cihaz gibi)
CmdBuffer[1] = Aygıt On/Off (Örneğin 1 ise aç, 0 ise kapat gibi)

Client Server program from the program before it receives a command structure above the screen writer then sends pıcmicro. Pıcmicro selected from the relay connected to PORTB evaluating these structures are shut or open.

PIC18F4550 USB HID LCD & LED APPLICATION (CCS)

PIC18F4550 USB HID LCD & LED APPLICATION (CCS)
PIC18F4550 USB HID LCD & LED APPLICATION (CCS)

This application uses the USB HID class. Hidden class, one of the most important features is that there is no need to install an external drive; installation is performed automatically by the system. Simple as it may seem an LED or LCD application should also pic usb-side configuration is discussed as well as Pc program is more complicated than my previous application. When using this class, there are points to be considered; relevant information can be found on USB specifications.

Class: Generic HID
PC Program: Visual C + + 2005
Compiler: CCS C

PIC18F2550 USB STEPPER MOTOR APPLICATIONS (C18)

Implementation of Stepper Motor Usb PIC18F2550 USB applications can send multiple commands stepper motor control example of how the shows. In practice, alone or in combination with bipolar stepper motors are driven full stride. At the same time Usb ADC applications are also supported. (AN0 and AN1 pot for this. Connect).

Warning: This application is only instructive nature; has not been tested.

Note: During the simulation due to excessive CPU usage pic 1 MHz instead of 48 MHz is well run.

PIC18F2550 USB ADC APPLICATION

Despite the complex nature of usb connector USB applications can be performed easily have prepared an example to illustrate. Microchip USB library is exploited. In addition to the pic code simulation program code files and PCs are available. Wishing to be helpful to everyone ..

Sınıf: MCH USB Generic Driver
Transfer: USB 2.0 ( Bulk )
PC Program: Visual C++
CCS C

PIC C18 CCS C USB Applications PIC18F4550 PIC18F2550 Circuits schematic source code files :

FILE DOWNLOAD LINK LIST (in TXT format): LINKS-7739.zip

Source: PIC C18 CCS C USB APPLICATIONS PIC18F4550 PIC18F2550 CIRCUITS

Quick Solutions to Questions related to USB PIC Projects:

  • How does the USB remote control server detect devices?
    The software detects the USB device upon plugging it into the PC and automatically configures the connection to listen on port 8090.
  • What is the command structure for the client-server program?
    Four bytes of data are moved between server and client, where the first byte is the device index and the second byte indicates the On/Off state.
  • Can I use this project without installing external drivers?
    Yes, the USB HID class application allows installation to be performed automatically by the system without external drivers.
  • Which compiler is recommended for the USB HID application?
    The article specifies using Visual C++ 2005 for the PC program and CCS C for the microcontroller code.
  • How many additional devices can be added to the main circuit?
    More setups for three additional devices can be connected to the same circuit using the RB1, RB2, and RB3 ports.
  • Does the stepper motor application support ADC inputs?
    Yes, the USB ADC applications are supported alongside the stepper motor control using AN0 and AN1 ports connected to potentiometers.
  • What transfer type is used in the USB ADC application?
    The application utilizes USB 2.0 Bulk transfer.
  • Is the stepper motor simulation tested at full speed?
    No, the application is only instructive and has not been tested; simulations run at 1 MHz instead of 48 MHz due to CPU usage.

About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.