Continue to Site

# convert from 16c84 to 16f628a need help

#### Pommie

##### Well-Known Member
Neither of the two schematics match the code. Look at port B play and record - on B2 and B5 in the code. Doesn't match either schematic.

Mike.
Edit, are we sure this is the right code for this board?

#### Jaison

##### New Member
Terry good night, this is what I can read from the 16F84A that works on the repeater board.

:1000000031281B00FF3FFF3F8C008C0E030E8D003C
:100010000B190B282D28901F1228061F11280613D4
:1000200012280617910B17280F14AF309100920B6E
:100030001C280F1669309200861F2628AC08031969
:100040002C28AC03031D2C288F172C28AC1A2C2825
:10005000AC0AAC1E2C288F130B110D0E83000C0E56
:10006000090083161F3085008130860080308100B2
:1000700083128601850195018F018F179001A101DF
:10008000AF309100693092000A30930094009901DA
:100090009A019B019C019F019E01A401AC010430C7
:1000A000A300051A6928901537308900802388003D
:1000B000F722890803195E28890356280130880031
:1000C00038308900F722890AF722890AF722890A3B
:1000D000F72283160F30850083129022A0308B0008
:1000E0000F1EA4280F12101FA428A00BA428901FD5
:1000F0008F2890132A03031980280130A000A42818
:10010000A90A2908EA22AA0003198C282A0A031935
:100110008C280330A000A4280730A000A4282A0AB5
:100120000319A328AA08031D9B28A90A2908EA2263
:10013000AA000319A42801302A180330A000901740
:10014000AA0CAA13A4281013F1308F050F1CB42891
:100150000F108F14930BB4280A3093000F15940BD3
:10016000B4280A3094008F1500308A0015088207E1
:10017000BD280029742942297B298F1B7B298E1CCD
:10018000DB28101B7B299C08031D7B29013095006F
:10019000861106110612861286109016A1012116EC
:1001A000C6309C009D01051286159B08031D7B2906
:1001B00018089B007B2986149C080319E628A118BF
:1001C000E6289C0106110030A100AB220512101F89
:1001D000901317089A0001309500A11FF528A1136C
:1001E000901630309C009D0186159B08031DFA284F
:1001F00010147B29901C7B29901018089B007B29E8
:100200000F1D05299A0B05293A298F1F7B290516F1
:100210009F01901E1D29861190129C018E1C16298B
:1002200003309E008614003095007B292108033995
:10023000383E89001D038800F7228E1810299F017F
:100240009A011608031928299900033095002A29D4
:1002500000309500101C30291030A100AB22A129DC
:1002600090187B291B08063C031C7B291130A10038
:10027000AB22A12905169F01023095001230A10082
:10028000AB227B298F1FDC288F1C7B29101B642944
:100290000E1A64291908053E1602031D5A299C08E6
:1002A000031D64290E1B5629901764291330A100E1
:1002B000AB2264290E1B64291908073E9019033EDE
:1002C0001602031D64299013990B7B2900309500B9
:1002D000AB0803197B29AB0B7B290530EA22AB0065
:1002E0001330A100AB227B298F1F7B2900309500A2
:1002F0001230A100AB229C08031993298F1C93296B
:10030000901A9D0A9C0B9329901E92298611901297
:100310008E18932921080339383E89001D0388006F
:10032000F722932906119B080319A7298F1DA729D6
:100330009B0BA7299018A62911308F1F0030A10010
:10034000AB2218089B0010109014A72990109E084B
:100350000319B1298F1CB1299E0BB1291430A100BA
:10036000C622061CBF291019EE2910158E1ABB29AA
:1003700014309F00051605080F39A200EE29101D44
:10038000EE2910119019E2292308031DD329043006
:1003900024020319FB292530240784002208EC23BA
:1003A0008000A40AFB29043C3C3EEA222202031DF1
:1003B000DB29A303EE29043023020319EC290430BE
:1003C000A300D3292308043C3C3E8900220888006E
:1003D000F722A30BEE2990110430A300013015057C
:1003E000031DFB299C08031DFB299E08031DFB29F7
:1003F000101BFB2986108F1C032A9F080319032A50
:100400009F0B032A05128F1B0A2A101E7028101238
:10041000F0227028101A70281016A40803197028EA
:1004200004302402031D8E2A250E2604A500270E63
:100430002804A700A51B892A251B602A25088900F6
:1004400027088800F7220230A100AB222508031DEF
:10045000342AA708031D2F2A043095005E2A003095
:100460009500101090105E2A2508013C031D422AB9
:1004700027088E0099019A019C019F019E01861117
:1004800095015E2A2508023C031D492A270896008B
:100490005E2A2508033C031D502A270897005E2A80
:1004A0002508043C031D572A270898005E2A2508C2
:1004B000053C031D5E2A2708AB005E2AF022702847
:1004C0002508BE39031D892A02308A00250E03390A
:1004D00082076D2A732A842A842A251C852A2708E4
:1004E000A100E2227028A608031D892A27187E2A67
:1004F00028187C2A06118B2A06158B2A2818822A8E
:1005000086118B2A86158B2A892A2708A100AB22FF
:10051000702803308C2A0230A100AB22F022702810
:100520000030EA22031D972A043095009B2A0030F0
:100530009500101090100130EA228E000230EA225D
:1005400096000330EA2297000430EA229800053032
:10055000EA22AB000800211EBA2A8E18B92A0E1C06
:10056000C62A2112A11CB92A211808002114A110A1
:10057000BA2A21100330A105E423A900EA22AA0027
:100580000730A00090131017861408000612861278
:1005900021180616A1188616211DD72A9D080319B1
:1005A00008001D0A031908001D039C00E02A210809
:1005B0000339383E8900EA229C000319080086149A
:1005C000061508000612861221180616A1188616AE
:1005D000A117080089008316081483120808080070
:1005E0000430A300A401A501A601A70108008316F9
:1005F0008B13081555308900AA308900881408111A
:1006000000008818002B8B178312080043004F004E
:100610005000590052004900470048005400200093
:10062000280043002900200031003900390036003D
:100630002C0020004A0045004600460052004500BC
:100640005900200042002E0020004F0054005400AA
:100650004500520053004F004E002E0020002000A5
:1006600041004C004C00200043004F004D004D0065
:10067000450052004300490041004C002000520058
:100680004900470048005400530020005200450034
:10069000530045005200560045004400200042002F
:1006A000590020005400480045002000410055003A
:1006B000540048004F0052002E00FF3FFF3FFF3F15
:1006C000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F3A
:1006D000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F2A
:1006E000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F1A
:1006F000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F0A
:1007000009081A3C031C003403308A0009088207D8
:100710000134003432341E34363400340F340D3496
:10072000FF3405340B34FF3403340F34FF34093401
:1007300002340034053410340A34153429343C347E
:10074000FF34FF34FF34FF3FFF3FFF3FFF3FFF3FDA
:10075000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3FA9
:10076000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F99
:10077000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F89
:10078000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F79
:10079000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F69
:1007A000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F59
:1007B000FF3FFF3FFF3FFF3FFF3FFF3FFF3FFF3F49
:1007C000FF3FFF3FFF3FFF3F03308A0021088207C2
:1007D0000F340C340634093403308A0022088207AF
:1007E0000D34013402340334043405340634073440
:1007F0000834093400340E340F340A340B340C340A
:02400E00F13F80
:00000001FF

#### Attachments

• 16f84.jpg
439.7 KB · Views: 55

#### Pommie

##### Well-Known Member
The reassuring thing about that hex dump is the version number is the same,
:1000000031281B00FF3FFF3F8C008C0E030E8D003C
That is the same as d'27' and it comes straight after a goto instruction.
There seems to be very little EEPROM though.

Mike.
Edit, missed the picture of the EEPROM dump.

#### Attachments

• nhrc2-usrguide-reve 20050811.pdf
315.7 KB · Views: 62

#### Pommie

##### Well-Known Member
The schematic in that manual doesn't match the code. Looks like it's been updated.

Nike.

#### augustinetez

##### Active Member
Jaison, please tell us which version of the pcb you have and a picture of both sides if you can.

#### augustinetez

##### Active Member
I've just done a compare of the Hex file from Jaison and the Hex from the software we have been working with - they are two completely different animals.

#### Pommie

##### Well-Known Member
Just adding 1 instruction would change a lot of the hex. As you say, pictures would be useful. Just finding where b2 & b5 go could be useful. Where did the source come from originally?

Mike.

#### augustinetez

##### Active Member
Just adding 1 instruction would change a lot of the hex.
But not the whole file, there's only 5-6 lines that are the same, everything else is different.

The file we have been working with is as supplied by Jaison in the beginning and I have checked this against the file provided by QST (it's the same) and also I was able to track down the authors original website that again had the identical source file.

In the process, I also compared the hex file from the authors website and that produced by compiling Jaisons source file and they are identical.
Just finding where b2 & b5 go could be useful.
In every schematic I have - the one from QST I posted and the REV A,D & E manuals I have here, they all go to the same place - RB2 to the ISD chip PLAYL line and RB5 to the ISD chips address select lines A6 & A4.

Where in the code did you see them go offf somewhere else? PORTB equates are set at near the top of the file and correspond (by labels) to above.

#### augustinetez

##### Active Member
I just compared Jaisons hex file and the one compiled from the original source and apart from 15 odd lines or so they match.

I'm wondering if the software he's using is not pulling the full hex out of the chip?

#### augustinetez

##### Active Member
Ignore post #67 - of course they're different, they are for two different processors one with all the banking code in - duh!

#### Pommie

##### Well-Known Member
For port B I was going of the comments (silly me).
I.E.
Code:
;
; Port B has the following
; B.0 (in ) = DTMF digit valid
; B.1 (out) = PTT
; B.2 (out) = ISD playl\
; B.3 (out) = ISD A0
; B.4 (out) = ISD A1
; B.5 (out) = ISD record\
; B.6 (out) = beep tone output
; B.7 (in ) = COR
;
As I said earlier, the most promising part is that the version (27) is correct and in the correct place.

Mike.

#### Jaison

##### New Member
Dears good morning, the board is homemade, the call sign and access password changes were made, it works with an ISD1820 adapted for voice, nothing more than that in the 16F84A. For tests with the new codes that friends are helping me, I leave the ISD1820 off the board to avoid interfering with the operation of the set.

#### augustinetez

##### Active Member
OK Jaison.

Out for most of today so will look at it soon.

#### Ian Rogers

##### User Extraordinaire
Forum Supporter
Pommie..

Can you help me to understand CBlock??? I though it was common block... I have used global variables before, similar to the code.... Why will c_copy and w_copy need to be separate... I normally program in C but in asm I hardly ever use cblock.. So I need to know.

#### Pommie

##### Well-Known Member
Think of cblock as org for SFRs. It's an instruction to tell the assembler I want my variables to go at this address next.
So cblock 0x20 will put variables starting at 0x20. Of course, 0x20 isn't common (not repeated in all banks) SFRs but 0x70 is. s_copy and w_copy are where the ISR saves STATUS and W so when the ISR happens you don't know what bank it's in so they need to be in the common area. An interesting thing with cblock is you can reserve different size of variables.
I.E.
Code:
  cblock  0x20
byte   ;single byte
word:2 ;16 bit variable
long:4 ;32 bit variable
endc

HTH

Mike.
Edit, the variables can have any name, I just used byte, word, long as examples.

#### Jaison

##### New Member
Dears good morning, I was researching yesterday trying to improve my understanding of programming and I found this page, in sheets 4 and 5 it talks about changes for PIC migration, but I didn't understand for sure if the changes are in the asm or hex file.

#### Attachments

• TALKING ELECTRONICS PIC Theory Page 33.pdf
138.8 KB · Views: 53

#### Jaison

##### New Member
This is the circuit I made the board for the 16f84A.

#### Attachments

• repetidora nhrc pp5mel2018.pdf
62.2 KB · Views: 56

#### Nigel Goodwin

##### Super Moderator
Dears good morning, I was researching yesterday trying to improve my understanding of programming and I found this page, in sheets 4 and 5 it talks about changes for PIC migration, but I didn't understand for sure if the changes are in the asm or hex file.
In the ASM, which when compiled will produce a different HEX file - it's not 'impossible' to alter a HEX file directly, but it's VASTLY more difficult than doing it to the ASM. If all you've got is a HEX file, it's much easier to disassemble that and create an ASM file, rather than trying to do it directly.

#### Pommie

##### Well-Known Member
This is the circuit I made the board for the 16f84A.
In the source they refer to an ISD1240 but your diagram has an ISD1820. Also no A0 and A1 on the ISD.

Mike.

Replies
10
Views
946
Replies
8
Views
1K
Replies
4
Views
1K
Replies
2
Views
817
Replies
22
Views
2K