Sei sulla pagina 1di 5

MICROCONTROLLER TUTORIAL [STEP BY STEP]

Pic Microcontroller Tutorial For Beginners With Step By Step Picture.

HOME FREE SOFTWARE DOWNLOAD SOURCE AND DESIGN ABOUT


FREE DOWNLOAD FREE DOWNLOAD

Search
USB 1.0 INTERFACING WITH PIC MICROCONTROLLER
Search in this Blog!
[STEP BY STEP TUTORIAL]
NAASIF NOMAAN 8:08 AM INTERFACING, MICROCONTROLLER, PIC,
PIC18F2550, STEP BY STEP, USB, USB 1.0, WITH NO COMMENTS
Bookmark this Blog

POPULAR POSTS ALL POSTS

POPULAR POSTS
Matrix [4x4] Keypad interfacing
with PIC Microcontroller [
PIC18f2550 ] in Proteus [Step
by Step]
Matrix Keypad interfacing with
PIC Microcontroller [ PIC18f2550 ] in
USB communication is better than serial communication , i think . Hardware interfacing Proteus [Step by Step] Basically a matrix
is very easier than Rs 232 . In USB 1.0 communication Low Speed -1.5Mbit/second & keypad[ 4x4] can be c...
High Speed -12Mbit/second . The upgrade version brings upgrade speed than older . Bipolar Stepper Motor
USB-3.0 has higher speed , 5Gbit/second and it's called super speed .For more Interfacing With PIC
information you can visit this page >> Wikipedia Usb. Microcontroller (PIC18F2550)
in Proteus [step by step]
In this tutorial i will use pic18f2550 microcontroller & it is very popular for usb .Now you
Stepper Motor (animation source :
can make a question , when usb gets high speed or low speed . At 6MHz clock we will get
wikipedia) Stepper Motors and It's Working
low speed and at 48MHz Clock we will get High speed . In this tutorial we will try to
Princ...
make higher speed connection .We are not going to use 48MHz ,because it is very noisy
Real Time Digital Clock Using
.We will try another technique instead of it .Microchip company provides internal PLL(
DS1307 and PIC
Phase Locked Loop ) circuit in some of speciäc products and pic18f2550 has internal Microcontroller [step by step ]
PLL Circuit .Now look at the picture : This tutorial contains
description about
microcontroller based digital clock and
DS1307 .We know microcontroller is a
computer and speciä...
How to make PCB (Printed
Circuit Board) at Home [step by
step]
Today i will show how to make
PCB at home . PCB means
Printed Circuit Board . Would you like to
know more about PCB? , please follow the
l...
Rs 232 , Serial Communication
with PIC Microcontroller in
PLL Circuit Proteus [step by step details]
Basically a microcontroller or
The PLL circuit converts 4MHz clock to 48MHz clock .So, we need 4MHz clock . We have computer can communicate
to divide the clock in such way so that we can get result 4MHz. Look at here , If we use with other computer through serial
20MHz divide it by 5 and we get 4 .Example : (20/5)=4 ,(12/3)=4.. .We have to deäne this communication. .If we would like to make a
in the source code. suc...
Now let's create a project in Proteus 8. Microcontroller Project : Digital
Voting Machine using PIC
Proteus 8 Circuit : Microcontroller ( PIC18f2550 )
Generally Digital Voting
Step 1: Machine is one kind of
microcontroller based machine which can be
performed in election . Once i had made
Di...
Servo Motor Interfacing With
PIC Microcontroller (
PIC18F2550 ) in Proteus [step
by step]
Servo Motor Servo motors are
very popular in the äeld of robotics .In this
tutorial i will show how to interface servo
motor wit...
Usb 1.0 Interfacing With PIC
Microcontroller [step by step
tutorial]
How to Create Project in Proteus _1
USB communication is better
Step 2: than serial communication , i
think . Hardware interfacing is very easier
than Rs 232 . In USB 1.0 communic...
Lcd 16x2 Scrolling Display
Using PIC Microcontroller [Step
by Step]
In this tutorial , i will show how
to make a Scrolling Display
using LCD and PIC18F2550 . Generally LCD
display has 16 pins . 16x...
Introduction to PIC 18F2550 Micocontroller
Microcontroller : Basically microcontroller is
one kind of Integrated circuit (IC) which
can be deäned as the single chip...
How to Create Project in Proteus 8_2
Powered by Blogger.

Live Trafäc Stats


Step3 :
ALL POSTS
▼ 15 (15)
► Jul (5)
► Jun (2)
▼ Jan (8)
PIC Experiment Kit [for 28pin] with PCB
Design
Usb 1.0 Interfacing With PIC Microcontroller
[step...
Rs 232 , Serial Communication with PIC
Microcontro...
Servo Motor Interfacing With PIC
How to Create Project in Proteus 8_3 Microcontroller...
DC Motor Interfacing with PIC Microcontroller
( PI...
Step 4: Bipolar Stepper Motor Interfacing With PIC
Microco...
Unipolar Stepper Motor Interfacing With PIC
Microc...
Real Time Digital Clock Using DS1307 and PIC
Micro...

► 14 (7)

TAGS
pic18f2550 (14)
microcontroller (11) using
(11) How to (9) step by step (9)
interface (8) pic microcontroller (7)
Step 5: proteus (7) Microcontroller Project (6)
picmicrocontroller (5) PIC (4) interfacing (4)
microchip (4) microcontroller_project (4)
microcontrollers (4) with (4) Pic Tutorial (3)
microchips (3) microcontroller programming
(3) mikroC (3) simulation (3) Lcd 16x2 (2)
Microprocessor (2) Stepper Motor (2) digital (2)
Copyright © Microcontroller Tutorial [Step by Step] | Powered By Blogger
Distributed By Blogger Template | Blogger Theme By NewBloggerThemes
Back to Top ↑
Temperature (1) Thief Detector (1) USB (1) Unipolar (1)
Water (1) at (1) battery (1) blinks (1) board (1) button (1) by
step (1) circuit (1) clock (1) electronic (1) experiment kit (1)
åash (1) åashing (1) home (1) how (1) i2c tutorial (1) in (1)
key pad (1) keypad (1) lavel (1) led (1) level (1) lm35 (1)
machine (1) make (1) making (1) matrix (1) max232 (1)
membrane keyboard (1) meter (1) mikroc pro for pic (1)
musical (1) printed (1) push (1) real (1) scroll (1) scrolling (1)
sensor (1) serial port rs232 (1) step (1) step bystep (1) tank (1)
How to änd parts in Proteus 8 time (1) tone (1) usb 1.0 (1) voltmeter (1) voting (1) work (1)

Step 6:

GOOGLE+ FOLLOWERS

Your email
Your email Address...
Address... Subscribe

How to änd parts in Proteus 8


Microcontroller T …
Step 7: 52 likes

Like Page Share

Be the first of your friends to like this

Usb 1.0 Interfacing With PIC Microcontroller Circuit

Now let's create a project in MikroC , because we need source hex äle to load .

MikroC Code :
Step 1:

Create New Project in MikroC_1

Step 2:

Create New Project in MikroC_2

Step 3:

Create New Project in MikroC_3

Step 4:

Include All Library

Step 5:

Editing MikroC project settings_1

Step 6:

Editing MikroC project Settings_2


1. As we know PLL circuit take input 4MHz clock . So we have to divide 12MHz by 3 so
that we can get 4MHz clock .If we use 4MHz we have no need this part .
2 & 3 . We are using USB 1.0 and it's High Speed clock 48MHz .So we have to devide it
by 2

4 . Here we are using 12MHz Crystal clock and the oscillator selection should be HS
Oscillator
5 . We have to enable voltage regulator .Basically it is an internal 3.3 voltage regulator
of pic18f2550.If we enable it , it is required to connect vusb pin with a 220 nf capacitor .
#Source Code :
unsigned char receivedata[64] absolute 0x500; // <--Variable Declaration
unsigned char senddata[64] absolute 0x580;
int i=0;
void Interrupt(){
USB_Interrupt_Proc(); //<--Interrupt function
}
void main() //<--The Main Function
{
HID_Enable(&receivedata,&senddata); //<--To Enable HID
while(1){ //<-- Infinity LOOP
while(!HID_Read()); //<--for reading
for(i=0;i<64;i++){
senddata[i]=receivedata[i]; //<--Sending received data to senddata[i] variable
}
while(!HID_Write(&senddata,64)); //<--for writting
}
}

1. unsigned char receivedata[64] absolute 0x500;


unsigned char senddata[64] absolute 0x580;

Here we have created character type two array variable senddata & receivedata. During
USB Communication we must have to keep all data in usb RAM ।PIC 18F2550
microcontroller's USB RAM memory address begins with 0x500 and ends with 0x7F.That's
why, we kept the receivedata[64] in 0x500 location and senddata[64] in 0x580 .
2.
void Interrupt(){

USB_Interrupt_Proc();}

void Interrupt() is one User Deäne function which contains USB_Interrupt_Proc()


function inside . Interrupt makes restriction for something .When we enable the
interrupt function , the connection is disabled.When we disable the interrupt function ,
the connection is enabled .
3. HID_Enable(&receivedata,&senddata);
This function will enable the USB1.0 .It keep received data at receivedata and send data
which are stored in the senddata variable .
Note : HID means "Human Interface Device"
4. char HID_Read();
This function receive data. If receiving is failed ,it returns 0
.Otherwise it returns character .
while(!HID_Read());
It means , this function tries to receive data until data are being received .
char HID_Write();

This function receive data. If receiving is failed ,it returns 0


.Otherwise it returns the numbers of data .while(!HID_Write());

It means , this function tries to send data until data are being sent .
5.for(i=0;i<64 data-blogger-escaped-font="" data-blogger-
escaped-i="">
senddata[i]=receivedata[i];
}
This loop will run from 0 to 63 and will keeps the received data to senddata variable
from receivedata variable.

#Descriptor File Addition


Descriptor File : This äle will make your pc understand about device's
informations.Like
Manufacture Name, Product ID , Vendor ID etc.
Now i will show you .How to create a Descriptor äle .

Step 7:

Create Descriptor File_1

Step 8:

Create Descriptor FIle_2

Step 9:
Adding descriptor äle with MikroC Project .
Adding Descriptor File

Step 10:

Step 11:

Step 12:

How to upload hex äle in proteus_1

Step 13:

How to upload hex äle in proteus_2

Step 14:

How to upload hex äle in proteus_3

Step 15:
In proteus Simulation we need to install virtual usb .

Install Virtual USB in proteus

Step 16:

Run Project

Now go to the Proteus Circuit and Just Run the project .

Output:
Now go to the Tool >>HID Terminal >> click on Terminal .

HID Terminal of MikroC


HID Terminal Output

Download Proteus File & MikroC File

Just Click on '' SKIP ADD '' and You will get the
download link

Thank You!

Good (0) Bad (0) Best (0)


Reactions:

? Facebook ? Twitter ? Google+ ? Stumble ? Digg

← Newer Post Home Older Post →

Related Posts Widget

0 comments:
Post a Comment

Subscribe to: Post Comments (Atom)

Potrebbero piacerti anche