There are setup differences. The 84A has additional fuctions that the original 84 doesn't have. Look at the 84A datasheet. I'll look at the program when I get home. And I'll suggest the changes thst you need to make.
There used to be a migration document at MicroChip that tells you what you need to change, it's fairly minimal - but as the chip was obselete 15 odd years ago, the document doesn't seem to be there any more - I might have it at home somewhere though.
As far as I'm aware the option and tris statements still work perfectly on the 16F84a, and even on far, far more modern devices as well - however, it's been recommended not to use it for a LONG, LONG time (including on the 16C84). MicroChip have long stated it's not supported, and 'may' be removed from later devices - but they still worked last time I tried.
So I wouldn't have thought it would have made any difference?.
I run it on ISIS.. the command " movlw b'011111000 " then " option " did nothing to the option reg.... the problem was in inclusion of the "p16f84a.inc". The rest was just to modernise the code.
I run it on ISIS.. the command " movlw b'011111000 " then " option " did nothing to the option reg.... the problem was in inclusion of the "p16f84a.inc". The rest was just to modernise the code.
There wasn't a problem..... "option" was not defined in the new ".inc" file, it was "option_reg" that need to be defined.... point is it works now.. I just put in the banksel because that is what we do now.
There wasn't a problem..... "option" was not defined in the new ".inc" file, it was "option_reg" that need to be defined.... point is it works now.. I just put in the banksel because that is what we do now.
Good point - if you were trying to write to the option register, it was indeed renamed later on - but the 'option' in the original source was an instruction, not a reference to the .INC file.
I wasn't aware though that the OP wasn't able to assemble the file, just that it didn't work. The original file assembles fine for me, with no modifications at all - no idea if it works or not though?.
I've not been able to find the migration document, I suspect it's two many backups away
From what I have read there really no migration the only big thing was the OSC the 16c84 is 10 mhz max and 16f84a is 20 mhz max the new Mplab has a lot of name changes that make older code not build .
From what I have read there really no migration the only big thing was the OSC the 16c84 is 10 mhz max and 16f84a is 20 mhz max the new Mplab has a lot of name changes that make older code not build .
You're perhaps thinking of the migration document from F84 to F84a (which I do still have), the 84a was just a 'later silicon revision' not really any big difference, the change from the C84 to the F84 was to cure the security bug it had.
but it did turn the warning things becoming message( I am using MPLAB )
I think The Inc problem you guys mentions is right
But what can i do /_\
Here is the original asm
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "mclock8.asm" /l"mclock8.lst" /e"mclock8.err" /d__DEBUG=1
Warning[224] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 131 : Use of this instruction is not recommended.
Warning[224] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 135 : Use of this instruction is not recommended.
Warning[224] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 146 : Use of this instruction is not recommended.
Message[305] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 173 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 177 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 248 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 263 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\LED\LED_CLOCK\CODE1\MCLOCK8.ASM 294 : Using default destination of 1 (file).
Here is Ian's asm
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F84A "mclock8.asm" /l"mclock8.lst" /e"mclock8.err" /d__DEBUG=1
Message[302] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 134 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 138 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[302] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 151 : Register in operand not in bank 0. Ensure that bank bits are correct.
Message[305] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 179 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 183 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 254 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 269 : Using default destination of 1 (file).
Message[305] C:\USERS\KOO\DESKTOP\PROPELLER CLOCK\MCLOCK8.ASM 300 : Using default destination of 1 (file).
I found that if i put resistors in Ra4 or MCLR, the chip stops running
if i pull them away, the chip runs normal, but the outpin voltage is so low , it just can't drive the led
He had no errors either, just warnings - perhaps he has a hardware problem preventing the circuit working?.
However, I would check on the 305 warnings, in case the deault setting isn't correct - it's always a good idea to add the w or f at the end of the instruction.
**broken link removed**
this is the schematic i am following
1. if i put resistors in ra4/mclr, the output pin voltage level got fixed at 5v
2. even if i put them out, the voltage level at led still got fixed at about 3V
the chip work fine(the output pin keep jumping) only when there is no resistor and led =_=
The resistor on MCLR is absolutely essential, it won't work without it - you may be experiencing random resets if you remove it, which could explain your 'jumping'.