Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

problem of programming pic16f84a

Status
Not open for further replies.

Byron Yau

New Member
: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
 
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.
 
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!!!
 
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?
 
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.
 
I post the link of the asm file below.

**broken link removed**

In fact, I want to make a propeller clock. If you are interested in the clock, you can come here: **broken link removed**
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!!!
 
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.
 
isaacj said:
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
 
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.
 
Hey,

I was looking at this site: **broken link removed**
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
 
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.
 
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
 
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.

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.
 
The code was written for a 16C61........as per the asm file, although the article text refers to the 71...
 
The 16C61 is discontinued (atleast, when i searched for it), and when i emailed the authors of the site, he recommended the 16F84 (or 16F84A) which should work fine...
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top