Electronic Projects, forums and more.

Go Back   Electronic Circuits Projects Diagrams Free > Electronics Categories > Micro Controllers


Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc.

Reply
 
LinkBack Thread Tools Display Modes
Old 27th February 2003, 10:47 AM   (permalink)
Default problem of programming pic16f84a

:cry:
I want to program a pic chip but i don't know how to do this.
I have a All-11 Universal Programmer. I can find pic16f84 driver in this programmer and then i try to program it. I ensure that my HEX file is no bug but the chip still does not work. I don't know what is the reason. And I want to know how to set the oscillation mode and the WDT configuration from the programmer.

I wait for your reply. THX
Byron Yau is offline  
Old 28th February 2003, 10:10 AM   (permalink)
Default

Generally Oscillator Modes and WDT are set in the assebly source file itself which is then assembled into the hex file at some specific location. Given below is a sample from one 16F84 assembly file.
Code:
list P=16F84
#include "p16f84.inc"
__config _XT_OSC & _WDT_OFF & _PWRTE_ON ;This is the line
I don't know for which assembler it has been written as I had downlaoded this code from the internet. But I guess most assemblers should accept it.

Regarding the non-functioning of your chip, I doub't whether your programm has been written correctly. If you don't mind post it over here to get the exact cause.
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 28th February 2003, 01:58 PM   (permalink)
Default Thanks for your reply

I program the pic chip is 16f84a. The HEX file is download from a website. So I don't want to post the code here.
When I open the asm file, I have found a problem.

LIST P=16C84;f=inhx8m

w equ 0 ; register destination addresses.
f equ 1
same equ 1

The chip mentioned in this asm file is 16c84 but I only have a pic16f84a chip. Is it possible to use this asm file to program my pic16f84a chip?????

THX for your reply again!!!
Byron Yau is offline  
Old 28th February 2003, 02:45 PM   (permalink)
Default

It seems the Oscillator configuration line is not written in the source file.
Could you give me the link of the file from where you downloaded it?
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 28th February 2003, 04:57 PM   (permalink)
Default

The c84 and the f84 are identical. The only difference between them is the c84 is "one time programmable", the f84 can be reprogrammed.
So, to answer your question, yes you can the same asm file for both chips. Just change all references for 16c84 to 16f84.
__________________
If this is not what you expected, please alter your expectations.
isaacj is offline  
Old 1st March 2003, 03:04 AM   (permalink)
Default I post the link of the asm file below.

http://www.luberth.com/message.asm

In fact, I want to make a propeller clock. If you are interested in the clock, you can come here: http://www.luberth.com/analog.htm
to get more information. I am a Hong Kong student. I can find pic16f84a in Hong Kong but the website mentions that the chip must be pic16c84/f84. So I want to know the different between pic16f84a and f84.

Looking forward to your reply. THX!!!
Byron Yau is offline  
Old 1st March 2003, 06:50 AM   (permalink)
Default

See what I said was correct, the file doesn't have "Config" line. Put the following line "__config _XT_OSC & _WDT_OFF & _PWRTE_ON " in the asm file just below "LIST P = 16F84" and re-assemble it using any freeware PIC assemblers available. One good assembler is MPASM from Microchip.
Functionally there is no difference between PIC16F84 and PIC16F84A. You can use either of 2 over here.
__________________
"There is no way to peace, peace is the way!"
kinjalgp is offline  
Old 9th March 2003, 12:34 AM   (permalink)
Default

Quote:
Originally Posted by isaacj
The c84 and the f84 are identical. The only difference between them is the c84 is "one time programmable", the f84 can be reprogrammed.
.

Ahemm, I think you will find the the power up timers are different between the 2 chips........ one is inverted in comparison with the other....both chips are flash and not otp
Chippie is offline  
Old 9th March 2003, 06:20 AM   (permalink)
Default

Oops. I would never have noticed the difference in the configuration bits between the two chips. As far as the OTP thing goes, I made an assumption since it was a "C" device. Guess I should have known better.
__________________
If this is not what you expected, please alter your expectations.
isaacj is offline  
Old 17th April 2003, 04:27 AM   (permalink)
Default

Hey,

I was looking at this site: http://hacker.instanet.com/PicPrgrKits.html
and i'm looking at the first programmer (Serial 8 & 18pin PIC Programmer kit ). Now, I know that it was mentioned that the PIC16F84 and PIC16F84A are the same, but now, can I use this programmer to program the PIC16F84A even though the site only says that I can program the PIC16F84?

Please Help

-Satish
SatishM is offline  
Old 17th April 2003, 06:54 AM   (permalink)
Default

The software that comes with that programmer can handle both. I would suggest getting the 40 pin version. It only costs a couple bucks more and can program all serial programed PICs. That way, if you ever need a PIC with more I/O ports(more pins), you won't have to invest in another programmer.
__________________
If this is not what you expected, please alter your expectations.
isaacj is offline  
Old 18th April 2003, 08:00 PM   (permalink)
Default

Hey,

Thanx for letting me know that the software can program the PIC16F84A. I'm a very early beginner in the world of micro controllers, and I'm trying to stick to a strict budget, and i'm wondering if there's a freeware software to program this PIC? I also have an assembly file from a website, and is there a way to check to see if it will work with this programmer/software/chip?

-Satish
SatishM is offline  
Old 19th April 2003, 04:25 AM   (permalink)
Default

The software that comes with the programmer will program the F84 without registration. If you want to program a different PIC, an F877 for example, you'll have buy the software or live with a file size limit.

Quote:
I also have an assembly file from a website, and is there a way to check to see if it will work with this programmer/software/chip?
You need an assembler to turn the source code into something the PIC can understand. Microchip has an IDE called MPLAB that you can download for free, it will do the trick. The assembler will generate a hex file that you will download to the PIC with your programmer.

The website you obtained the source code from should tell you what PIC the code was written for. If you post a link, I'll take a look for you.
__________________
If this is not what you expected, please alter your expectations.
isaacj is offline  
Old 19th April 2003, 04:47 AM   (permalink)
Default

Hey,

The website's link is: http://www.brouhaha.com/~eric/pic/caption.html and the link to the source is: http://www.brouhaha.com/~eric/pic/cc-0-2.zip
SatishM is offline  
Old 19th April 2003, 10:07 AM   (permalink)
Default

The code was written for a 16C61........as per the asm file, although the article text refers to the 71...
Chippie is offline  
Reply

Bookmarks

Thread Tools
Display Modes





All times are GMT. The time now is 06:31 AM.


Electronic Circuits  |  Learning Electronics
Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.

eXTReMe Tracker