Hi all,
my name is Stamatis and i'm from Heraklion-Crete, Greece.
I am totaly new here in this forum and in the world of PIC's
although i do have a advanced understanding in analog and HF electronics.
I am searching here for some help from PIC-Cracks to jumpstart.
My Problem is, that i've builded up a 16F84 based darkroom timer and can't programm the PIC.
The schematic was published in 2001 by Elektor.
As said above it was based on the 16F84.
The magazine can not provide the chip anymore and as i searched through the internet i found out that the chip is obsolete and was replaced last century by better chips.
So i bought some of the recommended 16F628A's.
I need to migrate the 16F84-code to the 16F628A.
So far i have read that i need to change some bits to make it work.
I always read that is easy done but i always get errors.
The original programm was programmed in JAL.
Elektor has provides the .asm and the .hex files on their webpage as free download.
I have downloaded the datasheets for both Pics and i'm more confused than before.
So far i know that need to change the memory adress, disable the comparators which are set by default in the 16F628A.
I also would like to use the internal 4 MHz oscillator of the 16F628A to save the crystal and the capacitors needed in the 16F84.
If i am not mistaken i need to do the following steps:
1.Disassemble the original .HEX file or use the original .ASM file
2.Add the two extra lines to disable the comparators
MOVLW 0x07
MOVWF CMCON
3.Set the fuses right (to use the internal oscillator)
4.Reassemble with MPASM
So far i am stucked on step 2 because i really don't know where EXACTLY i need to put the extra lines.
I made some attempts but at he end the MPASM always finds errors.
What am i doing wrong ?
Thank you in advance for your help.
Stamatis
-----------------------------------------
Here is the original HEX File.
:10000000FF308E008F009000FF309200D8208C10BF
:10001000D2208C10CC208C10C6208C10C0208C14C8
:10002000BA208C14B4208C14AE208C14A820920119
:10003000930194018C100C118C11A1208C119D2026
:100040008C1199208C119520061A27280C150C1D4F
:100050002D28061E2D288C140C118C184C288C155C
:10006000A120013095007F20050892008C11A1206D
:100070008C159D20013095007F20050893008C1180
:100080009D208C159920013095007F200508940053
:100090000310940D8C1199208C1C68288C159520C8
:1000A00001301202031C57281208950078200130F5
:1000B0001302031C5E2813089500712001301402FE
:1000C000031C6528140895006A208C108C1195205B
:1000D0002428692815089600FA309700C83098003F
:1000E00086281508960064309700643098008628AA
:1000F00015089600643097000A3098008628150885
:1001000096006430970001309800862817089A00FE
:10011000160899001730FF3E03188B28990B8A2880
:100120009A0B8828980B8628080091118C19911534
:10013000A52811118C191115A52891108C1991144D
:10014000A52811108C191114A52811088600080083
:100150008C1CAC288F17AD288F13DC288C1CB22880
:100160000F17B3280F13DC288C1CB8288F16B9285A
:100170008F12DC288C1CBE280F16BF280F12DC281B
:100180008C1CC4288F15C5288F11DC288C1CCA280C
:100190000F15CB280F11DC288C1CD0288F14D128E8
:1001A0008F10DC288C1CD6280F14D7280F10DC28C1
:1001B00012088E00650008000F0866000800DF289E
:02400E00F13F80
:00000001FF
my name is Stamatis and i'm from Heraklion-Crete, Greece.
I am totaly new here in this forum and in the world of PIC's
although i do have a advanced understanding in analog and HF electronics.
I am searching here for some help from PIC-Cracks to jumpstart.
My Problem is, that i've builded up a 16F84 based darkroom timer and can't programm the PIC.
The schematic was published in 2001 by Elektor.
As said above it was based on the 16F84.
The magazine can not provide the chip anymore and as i searched through the internet i found out that the chip is obsolete and was replaced last century by better chips.
So i bought some of the recommended 16F628A's.
I need to migrate the 16F84-code to the 16F628A.
So far i have read that i need to change some bits to make it work.
I always read that is easy done but i always get errors.
The original programm was programmed in JAL.
Elektor has provides the .asm and the .hex files on their webpage as free download.
I have downloaded the datasheets for both Pics and i'm more confused than before.
So far i know that need to change the memory adress, disable the comparators which are set by default in the 16F628A.
I also would like to use the internal 4 MHz oscillator of the 16F628A to save the crystal and the capacitors needed in the 16F84.
If i am not mistaken i need to do the following steps:
1.Disassemble the original .HEX file or use the original .ASM file
2.Add the two extra lines to disable the comparators
MOVLW 0x07
MOVWF CMCON
3.Set the fuses right (to use the internal oscillator)
4.Reassemble with MPASM
So far i am stucked on step 2 because i really don't know where EXACTLY i need to put the extra lines.
I made some attempts but at he end the MPASM always finds errors.
What am i doing wrong ?
Thank you in advance for your help.
Stamatis
-----------------------------------------
Here is the original HEX File.
:10000000FF308E008F009000FF309200D8208C10BF
:10001000D2208C10CC208C10C6208C10C0208C14C8
:10002000BA208C14B4208C14AE208C14A820920119
:10003000930194018C100C118C11A1208C119D2026
:100040008C1199208C119520061A27280C150C1D4F
:100050002D28061E2D288C140C118C184C288C155C
:10006000A120013095007F20050892008C11A1206D
:100070008C159D20013095007F20050893008C1180
:100080009D208C159920013095007F200508940053
:100090000310940D8C1199208C1C68288C159520C8
:1000A00001301202031C57281208950078200130F5
:1000B0001302031C5E2813089500712001301402FE
:1000C000031C6528140895006A208C108C1195205B
:1000D0002428692815089600FA309700C83098003F
:1000E00086281508960064309700643098008628AA
:1000F00015089600643097000A3098008628150885
:1001000096006430970001309800862817089A00FE
:10011000160899001730FF3E03188B28990B8A2880
:100120009A0B8828980B8628080091118C19911534
:10013000A52811118C191115A52891108C1991144D
:10014000A52811108C191114A52811088600080083
:100150008C1CAC288F17AD288F13DC288C1CB22880
:100160000F17B3280F13DC288C1CB8288F16B9285A
:100170008F12DC288C1CBE280F16BF280F12DC281B
:100180008C1CC4288F15C5288F11DC288C1CCA280C
:100190000F15CB280F11DC288C1CD0288F14D128E8
:1001A0008F10DC288C1CD6280F14D7280F10DC28C1
:1001B00012088E00650008000F0866000800DF289E
:02400E00F13F80
:00000001FF