Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How do i programing a pic with my programer

Status
Not open for further replies.

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Hello members of the forum,iam new to this board and i hope my question will be wellcome,i have a question concerning programing though i am new to it but i geust someone will help me to answer it. When a hex file is downloaded how can i burn it into a pic with my programer? Thanks
 

andre_teprom

Super Moderator
Staff member
Joined
Nov 7, 2006
Messages
9,221
Helped
1,147
Reputation
2,313
Reaction score
1,123
Trophy points
1,403
Location
Brazil
Activity points
53,680
You simply must select the HEX file in programmer browser and select option upload.
Give us mere details concerning the kit you´re using.

+++
 

eem2am

Banned
Joined
Jun 22, 2008
Messages
1,180
Helped
37
Reputation
74
Reaction score
23
Trophy points
1,318
Activity points
0
well in microchip you simply go to forum and ask there.

But say you have programmer...well...that just convertes your code into binary and arranges it to be loaded correctly into the PIC.

sO GO TO the instructions of the programmer.

or as i say, in microchip, they have forum for you.
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Hello everyone,I have a little problem an I don't know what to do about it, I have a hex file which I simulate using proteus and it works fine. But after burning it to the pic I test it and their is no output and the curcute is ok can someone tell me the reason why it fail to work is their any modification I need to do?
 

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,165
Helped
161
Reputation
396
Reaction score
191
Trophy points
1,353
Location
India
Activity points
10,573
Check the Voltage of MCLR Pin it must be 5V(approx)

Check Power Supply 5V and Gnd on the pins of controller..

If this part is okay..
Check the Crystal Frequency using an oscilloscope...
Whether is coming or not...


These are the basic connection for PIC,,
If all these are fine.. just put a simple LED toggling program,
and see whether the ports of the controller are toggling or not..

Hope this helps..
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Thank's for the reply arun sharma,but to test for led toggling I must write a program for it?
 

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,165
Helped
161
Reputation
396
Reaction score
191
Trophy points
1,353
Location
India
Activity points
10,573
Code:
//For PIC16F877A
#include<htc.h>
#define _XTAL_FREQ 20000000
void main()
{
TRISB = 0x00;
while(1)
{
PORTB = 0x00;
__delay_ms(1000);
PORTB = 0xFF;
__delay_ms(1000);
}

Try this code and check...

Hope this helps
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Thanks for the reply arun sharma,but in the code below I don't know where you assign the port as output and what{ void main()TRISB 0x00; while (1) { I am still learning programing so please guide me.
 

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,165
Helped
161
Reputation
396
Reaction score
191
Trophy points
1,353
Location
India
Activity points
10,573
Code:
#include<htc.h>
Header file must be included always when using HI-Tech C Compiler

Code:
void main()

Main part of program starts from here

Code:
#define _XTAL_FREQ 20000000

Specifying the Crystal Frequency, 20Mhz
If you don't include this line, you cann't use the delay function used in the main part of the program
Code:
TRISB = 0x00;

TRISB is a register with the help of this we can control the direction of PORTB
If we want to make PORTB as Output port then assign it as 0x00 and
if we want to make PORTB as input port then assign TRISB = 0xFF

Code:
while(1)
this means infinite loop, you program will stay here infinitely
Code:
PORTB = 0x00;
//Give Digital Low signal on all pins of PORTB
__delay_ms(1000);
//Give one second Delay
PORTB = 0xFF;
//Give Digital High to all pins of PORTB
//Give one second Delay

This code is executed in the while loop forever..
Hope this helps

Have a look at this site for some samples program
https://sites.google.com/site/coolembeddedlaboratory/

AT89C51 Tutorials
https://sites.google.com/site/coolembeddedlaboratory/home/atmega-8

PIC18F4550 Tutorials
https://sites.google.com/site/coolembeddedlaboratory/home/pic18f4550/tutorial-list

Have a look at, how to make circuit diagram and how to write codes, but before that just read the c language
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Wow I think you will be my programing lecturer,I understand it now and I will try the code you give me also I have to start learning the programing in c language then assembly, thank's so much arun sharma.
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Hello arun sharma, i bought new pic kit 3 today but i search for the interface on internet i could not find it please can you send the link for me or where to download it?
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
ok i have seen it and i download it
 

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,165
Helped
161
Reputation
396
Reaction score
191
Trophy points
1,353
Location
India
Activity points
10,573
Good..

You can found its user manual on microchip website...
Just have a look on that...
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Thank you very much boss
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
But their is another problem,it fails to connect it keep displaying not connected can anyone tell me why?
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Can anybody help me please,my pickit3 displaying not connected what should I do.
 

keibbow

Banned
Joined
Dec 10, 2010
Messages
60
Helped
3
Reputation
6
Reaction score
3
Trophy points
1,288
Activity points
0
Hello everyone, can some tell me how to make a function to make my running message on my lcd display to be moving?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top