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
 
Thread Tools Display Modes
Old 10th March 2005, 05:08 AM   (permalink)
Default PIC16F84 Queries

Hi! I am doing a project and am having headaches.

I am doing a heartbeat monitor using http://private.addcom.de/KeithWilson/Projects/hemon.htm

1. Is there any difference between PIC16F84 and PIC16F84A?

2. I heard that the source code for PIC16F84 cannot be programmed to PIC16F84A. It will not work. Is that true?

3. The circuit is using PIC16F84-10/P. However, I am only using a 4MHz crystal in the circuit. Can I use PIC16F84-04/P?

Please advise! Thanks!
vicgray is offline  
Reply With Quote
Old 10th March 2005, 05:57 AM   (permalink)
Default

If you havent ordered your pics yet , i would suggest a newer PIC ..perhaps one with a built in A/D converter..and a built in oscillator..
the difference between an F84 & an F84A is so slight..
the code is definatly compatible, yes..
williB is offline  
Reply With Quote
Old 10th March 2005, 07:01 AM   (permalink)
Default

Yes, though the difference between 84 and 84A is a little, but I have heard that they are note compatible with each other. But I have heard 84A is better.

I was using 84A instead of 84, and the circuit that was tested on protoboard just failed. I am now soldering it on the breadboard. hopefulle it would just be the misuse of PIC. And that by changing it back to 84 will do.

well, I don't know, cos I am an idiot.
vicgray is offline  
Reply With Quote
Old 10th March 2005, 09:26 AM   (permalink)
Default Re: PIC16F84 Queries

Quote:
Originally Posted by vicgray
Hi! I am doing a project and am having headaches.

I am doing a heartbeat monitor using http://private.addcom.de/KeithWilson/Projects/hemon.htm

1. Is there any difference between PIC16F84 and PIC16F84A?

2. I heard that the source code for PIC16F84 cannot be programmed to PIC16F84A. It will not work. Is that true?

3. The circuit is using PIC16F84-10/P. However, I am only using a 4MHz crystal in the circuit. Can I use PIC16F84-04/P?

Please advise! Thanks!
The 84A was the old replacement for the 84 (just a later silicon revision), but both are long obselete!. You should really use a more modern PIC, the 16F628 was the replacement for the 84 series, and in turn is now replaced by the 16F628A (again, just a later silicon revision). There are also various other new compatible PIC's, some of which have inbuilt A2D - like the 16F819 and 16F88.

All of these are pin compatible with the 84 series, and the original code runs with only VERY slight changes - basically to account for the extra hardware in the newer devices. For example turning OFF the comparators in the 628, and turning OFF the analogue inputs on the others.

What you generally CAN'T do is load the original HEX files, you need to reassemble the source files with the slight changes, plus altering the include file name in the header, and the fuse settings - but it's all VERY simple.

If you check my tutorials you will see that the 628 ones all include two lines commented as 'make it like an 84', these turn off the comparators.

As well as the 628 being a better spec, it's also cheaper!, plus it includes an internal 4MHz oscillator - saving you adding the external crystal and capacitors. This is why I choose it for my tutorials, it's so much easier to use than the 84 (and saves money!).
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 10th March 2005, 02:07 PM   (permalink)
Default

Quote:
Originally Posted by vicgray
I am now soldering it on the breadboard. hopefulle it would just be the misuse of PIC.
If you are in the soldering phase, I would highly recommend soldering in a socket, as opposed to the actual chip. That way, if you ever need to reprogram it, you can pull it out of the circuit, reprogram it, and put it back in, very very easily. Use an 18 pin one (my picture is a 16 pin one, oh well :P).
Attached Images
File Type: jpg socket.jpg (5.1 KB, 1907 views)
bonxer is offline  
Reply With Quote
Old 10th March 2005, 04:17 PM   (permalink)
Default

Yes, I am using a port to insert the IC.

My concern is more on this:

3. The circuit is using PIC16F84-10/P. However, I am only using a 4MHz crystal in the circuit. Can I use PIC16F84-04/P?

While there is not much time for me to change the IC, I don't know PIC programming. so, I have to stick with the current one.

Thanks!
vicgray is offline  
Reply With Quote
Old 10th March 2005, 06:06 PM   (permalink)
Default

Yes, it will work fine. If you notice in the picture that is included in the ZIP file, he's even using a 4.000 MHz crystal. Since the PIC you're using is an 84, and his timing delays are actually written for 4 MHz instruction cycles, and you are running on a 4 MHz crystal, there's no problem at all. You shouldn't have to change a thing. Just compile it to a hex file and upload it to the PIC.
bonxer is offline  
Reply With Quote
Old 10th March 2005, 06:27 PM   (permalink)
Default

Quote:
Originally Posted by vicgray
3. The circuit is using PIC16F84-10/P. However, I am only using a 4MHz crystal in the circuit. Can I use PIC16F84-04/P?
There appears to be NO difference between PIC's with different speed ratings (except the price!) - presumably they all come off the same production line and are probably stamped 4 or 10 regardless?.

I've happily used 4MHz rated PIC's at 12MHz - with no ill effects at all. I never even look what it says on the PIC any more, they all seem quite happy at any speed.

As for running them slower, that's even less concern - PIC's will run right down to DC.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 10th March 2005, 08:01 PM   (permalink)
Default

A lot of processors are assigned speed ratings during testing. They are all made in the same way but due to process variations some are better than others.
bmcculla is offline  
Reply With Quote
Old 11th March 2005, 03:35 AM   (permalink)
Default

Thanks to all! Looks like I will go back to PIC16F84-04/P after all the advice given! Thanks again.

Now, if you notice the programs that it includes in the ZIP file, there are three seperate files:

1. hemon.asm
2. hemon.inc
3. reg16c84.inc

When I read the "hemon.asm", there are these lines of instruction:

Code:
include	"reg16c84.inc"	;register memory mapping file
	include "hemon.inc"	;heartbeat definitions
What does this mean?

Do I have to assemble these three files altogether to become one single file, and then only change it to HEX and flash it to the PIC16F84?

If yes, how do I use MPLAB to do that?

Thanks again!
Attached Files
File Type: zip designguide.zip (131.1 KB, 162 views)
vicgray is offline  
Reply With Quote
Old 11th March 2005, 01:57 PM   (permalink)
Default

the include files just have to be accessable to the assembler, which is in MPlab..
williB is offline  
Reply With Quote
Old 12th March 2005, 04:28 AM   (permalink)
Default

So, as long as the MPLAB has verified the program, I would just need to flash the hemon.asm to the IC will do?
vicgray is offline  
Reply With Quote
Old 12th March 2005, 08:05 AM   (permalink)
Default

Quote:
Originally Posted by vicgray
So, as long as the MPLAB has verified the program, I would just need to flash the hemon.asm to the IC will do?
Hemon.hex is the file you need to load to the chip, it's created by the assembler.
__________________
PIC programmer software, and PIC Tutorials at:
http://www.winpicprog.co.uk
Nigel Goodwin is offline  
Reply With Quote
Old 12th March 2005, 03:23 PM   (permalink)
Default

Oh yeah, forgot about it. HEX is the one I need. Well, I shall proceed with my project then. Thanks to all!
vicgray is offline  
Reply With Quote
Old 3rd March 2007, 01:31 PM   (permalink)
Default

ive already build up the program and it was sucessful on MPLAB, but the problem is, the only output are 142, or 14... the only digits that been seen are 1, 2, and 4.. i simulate the program at PROTEUS.. can anyone help me? thanks alot...
bynes is offline  
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes




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


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