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.

16C84 program into 16F84

Status
Not open for further replies.

tiococo

New Member
Hi guys. I'm pretty new into microcontrollers and to get me introduced into this marvelous world I decided to start with some projects about midi language.

The first thing I did was to clone a Olimex JDM PG2C. Tell me if you want the PCB artwork. I made one in Eagle following a photo of the real thing I had found ;)

then I tested the programer with the midi merger at **broken link removed**. Things went OK. Everything worked ok so I have to move on.

I had found a project based on a 16C84. First problem. I can't find 16C84s anywhere. I searched for a migration document from 16C84 to 16F84 but no success. the only thing I know is that the 16F has more RAM and some fuses pins inverted but thats all. Both are pin compatible.

What do I have to do for this project to work?

here is the circuit and the program if you want to take a look

**broken link removed**

Thanks In advance!
 
The migration document is long gone from MicroChip's website, the 16F84 replaced the 16C84 last century, and the 16F84 was in turn replaced by the 16F628, also last century - that migration document is long gone as well.

There's very little change required though, check the fuse settings, make sure GPR's start at the address (and if not, change it), for the 16F628, you also need to disable the analogue comparators, this takes two lines, and can be seen in my tutorials.
 
Thanks for the replies guys!. Well... here ve go again...

since I'm a rookie please explain me where do I find what is "fuse settings",
and what "GPR's start at the address" is :D

I searched in the datasheets of both teh 16C and A6F and I can't find the word "FUSE" or "GPR" :s

I also ran this code in the Mplab debbuger for a 16F84A and no errors where reported

Nigel i'll make your tutorial ASAP. theres so much thing I been missing from this i don't know where to start.

Thanks for all!
 
The fuses are more commonly referred to as the config settings.

If you have MPLAB installed then have a look in "C:\Program Files\Microchip\MPASM Suite" and you should find a file called P16F84A.INC. This has the new fuse setting you need at the end of the file.

They look like this,
Code:
;==========================================================================
;
;       Configuration Bits
;
;==========================================================================

_CP_ON                       EQU     H'000F'
_CP_OFF                      EQU     H'3FFF'
_PWRTE_ON                    EQU     H'3FF7'
_PWRTE_OFF                   EQU     H'3FFF'
_WDT_ON                      EQU     H'3FFF'
_WDT_OFF                     EQU     H'3FFB'
_LP_OSC                      EQU     H'3FFC'
_XT_OSC                      EQU     H'3FFD'
_HS_OSC                      EQU     H'3FFE'
_RC_OSC                      EQU     H'3FFF'

Swap these for the ones in your file and it should all be fine.

Mike.
 
Thanks Pommie!!

thats How it looked in the original.

Code:
_CP_ON          equ   H'3FEF'     
_CP_OFF         equ   H'3FFF'     
_PWRTE_ON       equ   H'3FFF'     
_PWRTE_OFF      equ   H'3FF7'     
_WDT_ON         equ   H'3FFF'     
_WDT_OFF        equ   H'3FFB'     ; PIC16C84 CONFIGURATION WORD:
_LP_OSC         equ   H'3FFC'     ;    OSC selection:   XT
_XT_OSC         equ   H'3FFD'     ;    WDT:             disabled
_HS_OSC         equ   H'3FFE'     ;    Power-up timer:  enabled 
_RC_OSC         equ   H'3FFF'     ;    Code protection: OFF

it seems that the diferences are in the code protect Fuse and on _PWRTE_ON that values are inverted

Could you advice me a program to make the hex file from this*.asm?
 
Thanks blueroom.

I protoboarded the circuit. I'll let you folks know if this thing is alive or not.

Regards
 
It's Alive!!! It's Alive!! Muahahahaha

Thanks Guys. I aprecciate a lot your help. That encourages me to keep going.

See ya in the forum. Next questions will be about Nigels tutorial for sure :D

(What a welcome BTW)
 
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top