![]() |
![]() |
![]() |
|
|
|||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
|
|
Thread Tools | Display Modes |
|
|
(permalink) |
|
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! |
|
|
|
|
|
|
(permalink) |
|
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.. |
|
|
|
|
|
|
(permalink) |
|
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. |
|
|
|
|
|
|
(permalink) | |
|
Quote:
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!). |
||
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
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! |
|
|
|
|
|
|
(permalink) |
|
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.
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
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. |
||
|
|
|
|
|
(permalink) |
|
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.
|
|
|
|
|
|
|
(permalink) |
|
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 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! |
|
|
|
|
|
|
(permalink) |
|
the include files just have to be accessable to the assembler, which is in MPlab..
|
|
|
|
|
|
|
(permalink) |
|
So, as long as the MPLAB has verified the program, I would just need to flash the hemon.asm to the IC will do?
|
|
|
|
|
|
|
(permalink) | |
|
Quote:
|
||
|
|
|
|
|
(permalink) |
|
Oh yeah, forgot about it. HEX is the one I need. Well, I shall proceed with my project then. Thanks to all!
|
|
|
|
|
|
|
(permalink) |
|
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...
|
|
|
|
|