need help interpreting code for a 68HC705

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

need help interpreting code for a 68HC705

2,694 Views
JeremyA
Contributor I
I was hoping for a bit of help with this problem that I have.
I picked up some 2x20 back lit LCD modules w/ onboard rs232 driver.
The main controller is a 68HC705. 
I was hoping to use these to output ascii characters to employees when
they clock in so they can see the feedback from their actions.
The manufacturer was kind enough to give me firmware code (not source)
in .S19 format (see below) as well as schematics.  I also have the
LCD manual.  I'm not at all familiar w/ this controller and
don't know much about coding at this level but thought I'd ask for some
help.  I'm hoping to find out the baud rate it's operating at
(schematics say 4Mhz clock) and if there seems to be any command or
escape character sequences that I need to use to send information to
the display.
Any help is greatly appreciated, I'd happily send a nice gift to anyone
who can help get this working.
Thanks,
Jeremy
S11307001A0DA6164A26FD1D0DAE446F205A26FB6F
S11307103F20A61EB704010011A6FFB759B75B4FCF
S1130720B65CA640B75A18002004A61FB704A6FF5B
S1130730B705B711CD0759CC08A912009CAE2D11ED
S113074000A600C71FF0B659A1FF2605CD079620C5
S113075003CD07B620E9CC07001500A638CD0972F1
S1130760A638CD0972A638CD0972A60FCD097FA689
S113077006CD097F1400CD098BA680B75FA62DCDC9
S1130780099DCD081E81CD098BA601CD097FCD0819
S11307901EA680B75F81B621A1312606A62BB75AC3
S11307A0200EA1342606A62DB75A2004A62AB75A2D
S11307B01800CC08A981A608B755A600C71FF00BDE
S11307C000F8A600C71FF00A00F8A605CD0839CD29
S11307D008284426E54D4DA60CCD0839CD082846F9
S11307E0463620A60ACD0839B655A10826003A5542
S11307F026EAB620A15E2704E7225A815D2707A6D0
S11308005EE7225A20F61900A601CD099D180012B0
S11308100DA6FFB705CC08A9A60FCD099581A60C96
S1130820CD0995A600B762814F0A0000A9000A000D
S113083000A9000A0000A900819D9D4D4A26FA8165
S11308403F051300B601B7601200330543A4072621
S11308500311588100581CAA30B721B659A1FF26AC
S11308600D4FB75B43B75C190010589D9D9DCD0893
S1130870821058A6FFB757A6FF4A26FDB6574A2648
S1130880F481AE099824041800200419002000A65D
S11308900DCD08394D36215A26EB9D1800A60ECDF4
S11308A00839A60FCD08394F819C9ACD0786A60139
S11308B0B754A680B75FA600AE2DBF61E62227100D
S11308C0A15E272EA1802442A17C261D3C54201C1D
S11308D0B65BA1FF2605CD093E200EB65CA1FF261E
S11308E004B65A2004A62A2000CD094AB6614A97C4
S11308F026C8BE612709A620CD094A3A6120F3A67D
S1130900B4CD092020ACB763202AB16227E4B762D2
S1130910CD0995CD0818CD0840A600C71FF020F6D4
S1130920B75DAE28CD0840A600C71FF05A26F53A99
S11309305D26EF819CA600B720AE2DCC0746B65AA3
S11309404CA1692602A640B75A81B75EB654A403E7
S1130950B7542604A620B75EB65FA1942706A1D497
S1130960271C2002A6C0B75FCD0995B65F4CB75FC0
S1130970B65EB7011600A601CD099D17008181B7A7
S1130980011600A601CD099D1700811500A601CD11
S1130990097F1400811500CD0972140081B75DAE82
S11309A0F05A9D26FCA600C71FF021FE21FE21FE61
S11309B021FE21FE21FE21FE21FE21FE9D9D3A5DA8
S11309C026DD81806718CEA06CCEA0C6CC005AFD6F
S11309D0A0447FA04E8608B7A04F8601B7A0257F0C
S11309E0A0218604B7A0588D2F18ED003CFEA0442A
S11309F00909FFA044271F38180818088D1A18ED94
S1130A00003CFEA0440909FFA044270A381808182E
S1130A1008FFA04A202720777FA0347FA035A600B6
S1130A208100261008A6007FA035F6A0553DF7A04A
S1130A303408A600F6A0553DF3A0340839FCA06A9A
S1130A40FEA05402581AB3A054250108FFA034FE96
S1130A50A04A4FE60008C1002616EC00080885806D
S1130A60270E847F1A83000026097CA0210820EA2F
S1130A707EEB60FFA04A3637F6A04FC10826057FFB
S1130A80A04F2029B6A04EBAA0255A270D20F87AE7
S1130A90A04627037EE90B7EEC0318A7003CFEA0CA
S1130AA04409FFA04427E83818087CA058B6A021C0
S1130AB0275936FCA02A27037EEBC13218A7003C35
S1130AC0FEA04409FFA04427C63818083332090998
S1130AD0847FBDEA271A831A002203CC1A0018ED7A
S1130AE0003CFEA0440909FFA04427A338180818B5
S1130AF008B6A0587FA058B7A066B6A0658A08B704
S1130B00A065FEA04A7CA02B7EE9D218A7003CFE7B
S1130B10A04409FFA044273338180833320909FCDC
S1130B20A0301A831A002203CC1A0018ED003CFEF0
S1130B30A0440909FFA04427123818081808FCA08B
S1130B4066270BB6A058B7A06720097EEA8FB6A027
S1130B5058B7A066B6A0658A408A02B7A06520FE91
S1130B60FFA04A847FFEA03402051AB3A0342501F5
S1130B7008FFA026B6A04EF6A04F48BAA0255A27D3
S1130B80177AA02726F4B7A04EF7A04FB6A02543A6
S1130B908401B7A0257EEA4F18A7003CFEA04409B3
S1130BA0FFA04427123818087CA0588600B7A04E2E
S1130BB0C608F7A04F20CA7AA04627037EE90B2077
S1130BC0423218A7003CFEA04409FFA04427313854
S1130BD0180833320909847FBDEA271A831F4F227C
S1130BE003CC1F4F18ED003CFEA0440909FFA044AC
S1130BF0270E3818081808B6A058B7A0677EEB541B
S1130C007EEA8F3886F2B7A06686F2B7A067864080
S1130C108A028A08B7A06520FE0FCCA06CFDA04A0A
S1130C207FA044CE0000FFA02AFFA02EFFA030CC5E
S1130C30EC7EFDA028FCA03A1A8300642508FEA0DF
S1130C403CFFA03A200A8D161A83000026028D0765
S1130C508300528D4120EFCCFFFF8D3A206B7FA0A3
S1130C60357FA040FC800E8300AAFD801E0E860402
S1130C70B5802327FBFE8010B780233C8F38B3A0B8
S1130C803E1A830064220220E50F73A0400FFFA0E8
S1130C903A8FB3A03E39FEA04AA7007AA045271395
S1130CA008E7007AA045270B08FFA04AFCA03AFDFC
S1130CB0A03E3986F2B7A06686F2B7A06786408A5E
S1130CC0028A08B7A0650E20FECC0100B3A044F749
S1130CD0A06B86028A20B7A06AB7A0650E20FE1812
S1130CE0CE80008F4D2B06181D00402004181C00D8
S1130CF040847F8F39FFA0047FA0498DE2A600FEC7
S1130D00A00484FDB7A06508FFA0048520260B85F8
S1130D104027037EEDBD7FA065398602B7A056A6A5
S1130D2000FEA004B7A06608FFA004B6A066B7A0A2
S1130D3058FC800EC30064FD801ECEED4AFFA00067
S1130D408608B78023B7802220FE7F80087380083E
S1130D5086064A26FD7F8008FEA004A600FEA004A5
S1130D6008E600FEA004F3800EFD801E0808FFA024
S1130D70047AA0587AA05827068608B780233B7ABD
S1130D80A056260DBDF15F3018CEED901AEF073B4B
S1130D9039FCA004F0A0668200FDA004B6A066B7EA
S1130DA0A058FEA004B6A0658408270808087AA005
S1130DB0587AA058FFA0048608B780233BA600FEFB
S1130DC0A004B7A06608FFA004A600FEA004B7A074
S1130DD06708FFA004A600FEA00408E600FEA00425
S1130DE0FDA0680808FFA004A600FEA00408E60011
S1130DF0FEA004FDA06AF6A069CEEE17E100230967
S1130E00080808088CEE3B23F3A601B7A0551AEE98
S1130E100218FFA05920281D0EF08E2110F09D25E8
S1130E2012F0AD2914F0BE2D16F0D03318F0E336CD
S1130E301AF0F73B1CF10C3F1FF1224320F139B6A5
S1130E40A066B7A058FEA0040808FFA004CCA06CBC
S1130E50FDA04A7AA0587AA058A600FEA00408E68D
S1130E6000FEA004BDF151FEA04A810027066F00D8
S1130E7008A70008E70008FFA04AFEA0040808FF2E
S1130E80A0047AA0587AA058A600FEA00408E600A0
S1130E90FEA004BDF151FEA04A810027066F0008A0
S1130EA0A70008E70008FFA04AFEA0040808FFA066
S1130EB004A600FEA004B7A04EC608F7A04FCC00BD
S1130EC000CE000018CE00007AA04F2D750C79A03A
S1130ED04E2516188C0000270A7CA04F76A04E8D54
S1130EE04020E508F3A06A20DF8C00000D270A7C6F
S1130EF0A04F76A04E8D0920CF1808F3A06A20C811
S1130F00BDF151FEA04A810027066F0008A7000822
S1130F10E70008FFA04ACE000018CE0000CC000075
S1130F2039BDF151FEA04A810027066F0008A700D1
S1130F3008E70008FFA04ACE000018CE0000CC004D
S1130F4000393CFEA00408FFA0047AA058271536F7
S1130F5037A600FEA004B7A04EC608F7A04F333250
S1130F60387EEEC838188C000027028DB4FEA00429
S1130F70A600FEA00408FFA0048100271A36CCFFB7
S1130F80FFBDF151FEA04A6F00088A80ED000808F9
S1130F90FFA04A324A26E6FEA004A600FEA00408EA
S1130FA0E600FEA0040808FFA0047DA049270383EF
S1130FB0054FBDF151FEA04A810027086F00088A41
S1130FC080A70008E70008FFA04A7DA0492603FF88
S1130FD0A050B6A0658508271DB6A06585042736F0
S1130FE07DA04927317FA049FCA004F0A0678200BE
S1130FF0C003820020067FA049FCA004F0A0668202
S113100000C0038200FDA004B6A066B7A058CCA01F
S11310106CFDA050202A7DA049270FFCA004F0A05D
S113102067C200C003C200FDA004B6A067B7A05801
S11310307DA049260B8601B7A049FEA0047EEE538D
S11310407F8008738008FEA05918CEA06C18FFA0FA
S11310504CFCA04AFDA0524F18E600C10026161809
S11310600818EC0018087AA04B7AA04B8580270555
S11310707F8009847F4C5CAD007AA04BB6A04BB155
S1131080A04D2707180873800920CC7EF15F5A27EA
S11310900573800820F84A26F87F8008395A270605
S11310A07380080120F74A26F77F8008395A2707FA
S11310B0738008010120F64A26F67F8008395A27F2
S11310C00873800801010120F54A26F57F8008395C
S11310D05A27097380080101010120F44A26F47F8C
S11310E08008395A270A738008010101010120F39D
S11310F04A26F37F8008395A270B738008010101BF
S113110001010120F24A26F27F8008395A270C7324
S113111080080101010101010120F14A26F17F80CB
S113112008395A270D7380080101010101010101E9
S113113020F04A26F07F8008395A270E7380080170
S1131140010101010101010120EF4A26EF7F80081E
S113115039FEA05402581AB3A0542501088F397FD0
S113116080087F80097380098602B780218631B7A1
S113117080238600B7802239B6802EB7A01685203A
S11311802702200AB6A0168540270220333B840E8E
S11311902705F6802F20EDB6802D852027E6FEA0BA
S11311A00EF6802FE700088CA0192603CEA017FFA7
S11311B0A00EBCA010270220CB84DFB7802D20C452
S11311C0B6802D858027C6FEA014E600F7802F0880
S11311D0BCA012260B847FB7802DCEA019FFA012CD
S11311E0FFA01420A88608B78023FC800EFD801E73
S11311F0FEA02E08FFA02EFEA03209FFA032B6A04A
S113120065850227035F204D7DA0402707FCA0329F
S11312102731203DFCA03E188FFCA028C3000CBF42
S1131220A036FEA0368FC300088FED008F83000424
S11312308F1AEF008F8300038FA6008A10A7007F08
S1131240A0373BCCE171CEA1FAED00CEA1FCED00BC
S11312503BFC800E3B8602B780218631B780238613
S113126000B780224FBEA0470E398640B780253B89
S1131270FEA0006E007EE0007EE0007EE0007EE0E6
S1131280007EE0007EE0007EE0007EE0007EE00084
S11312907EE0007EE0007EE0007EE0007EE0007EF6
S11312A0E0007EE0007EE0007EE0007EE0007EE084
S11312B0007EE000E0007EE0007EE0007EE0007E54
S11312C0E0007EE0007EE0007EE0003F04004B6A28
S11312D0067B7A0587DA049260B8601B7A049FEA79
S11312E00047EEE4F7F8008738008FEA0592081209
S11312F03F06018CEA06C18FFA04CFCA04AFDA05AF
S113130024F18E600C1002616180818EC00180879F
S1131310AA04BC0F123F0807AA04B858027057F871
S1131320009847F4C5CAD007AA04BB6A04BB1A04D0
S1131330D27071808738009808123F0A020CC7EFF8
S11313401765A270573800820F84A26F87F8008354
S113135095A27067380080120F74A26F7309123F50
S11313600C07F8008395A2707738008010120F6480
S1131370A26F67F8008395A270873800801010125E
S11313800F500F123F0E04A26F57F8008395A270FE
S113139097380080101010120F44A26F47F8008392
S11313A095A270A738008A00123F10001010101088
S11313B0120F34A26F37F8008395A270B7380080FB
S11313C01010101010120F24A26F27FB00123F12EE
S11313D008008395A270C7380080101010101010F8
S11313E0120F14A26F17F8008395A270D7380080EB
S11313F0130F123F1400101010101010120F04A23B
S11314006F07F8008395A270E73800801010101061
S113141010101010120401123F160EF4A26EF7F809
S113142000839FEA05402581AB3A0542501088F3BA
S113143097F80087F800973800986609123F18005B
S11314402B780218631B780238600B7802239B68A0
S113145002EB7A01685202702200AB6A0168540EF2
S11314600E123F1A0270220333B840E2705F680222
S1131470F20EDB6802D852027E6FEA00EF6802FEC9
S1131480700088CA0A03123F1C0192603CEA017F83
S1131490FA00EBCA010270220CB84DFB7802D20CA0
S11314A04B6802D858027C6FEA0909123F1E014EAC
S11314B0600F7802F08BCA012260B847FB7802DC27
S11314C0EA019FFA012FFA01420A88608B780E051F
S11314D0123F20023FC800EFD801EFEA02E08FFA82
S11314E002EFEA03209FFA032B6A06585022703554
S11314F0F204D7DA02123F220A0402707FCA0322DE
S1131500731203DFCA03E188FFCA028C3000CBFAEE
S1131510036FEA0368FC30008602123F2408FED001
S113152008F8300048F1AEF008F8300038FA6008E6
S1131530A10A7007FA0373BCCE171CEA1FAD0D1283
S11315403F260ED00CEA1FCED003BFC800E3B8601C
S11315502B780218631B780238600B780224FBEAAC
S11315600470E703123F280398640B780253BFEA20
S11315700006E007EE0007EE0007EE0007EE0007A6
S1131580EE0007EE0007EE0306123F2A0007EE0006
S113159007EE0007EE0007EE0007EE0007EE000777
S11315A0EE0007EE0007EE0007EE0007E20010EF82
S11315B02C0E0007EE0007EE0007EE000405123FB4
S11315C0FD6F18FF28FF292F295F298F287F29EF16
S11315D02A1F2A4F2A7F2AAF2ADF2B0F281F2B6F9F
S11315E02B900310DFFF6F2BCF2BFF2C2F2C5E00D3
S11315F005039030000F0C00000000000000000004
S1121FF16AF29FF2A2F2A509C3073A09C30700D7
S9030000FC

schematic.jpg
Message Edited by t.dowe on 2009-10-27 12:22 PM
Labels (1)
0 Kudos
6 Replies

546 Views
bigmac
Specialist III
Hello Jeremy,
 
The S19 file will be virtually of no use to determine how the firmware operates.  It would permit you to program a new device, but that is all.  Be aware that the HC705 family is now obsolete, and the JJ7 device in particular became obsolete many years ago.
 
The manufacturer should be able to provide the operating details for the board - if he is unable or unwilling to do so, the board is likely to be of no use to you.  To have any hope of understanding or modifying the code, at minimum you would need the full source code (probably originally written in assembler).  This assumes that you would be able to purchase blank devices to program the modified code into.  These devices were one time programmable (OTP), unless the package was windowed.
 
The existing board is unlikely to be suitable to easily substitute an alternative MCU type.
 
Regards,
Mac
 
0 Kudos

546 Views
JeremyA
Contributor I
Thanks for the reply,
A long time ago I worked w/ 8051's  (for a very short time) and remember that dissassembly of the code was possible.   I wouldn't mind taking the time to try to figure out the code myself to see what it's doing on the bus but I've not had much luck in the disassembly process and w/ some of the commands...
e.g. satA 0,x  ..  the reference manual I have lists this mnemonic as having only one parameter (operand?  I don't know if they are the same)..   I've spend several days trying to do this but I don't know if
I'm using accurate data (disassembly) or have a complete list of the mnemonics.   I have time to try to figure it out but w/o the assurance of complete dissassembly and opcodes it seems a bit hopeless to me.
 
In talking with the manufacturer they weren't able to give me any operating instructions, but I thought that the schematic and code might be able to help with that.  They also said that most of their devices defaulted to 9600 baud.  Yesterday I was able to use the schematics to pin it out to the computer correctly, by when I sent characters to it I didn't have much luck, occasionally the display would clear, or the characters would change from all '*' to all [left arrow]...   I was thinking that I could send a targed 2 or 3 byte sequence to the comm port with hopes of brute force the command characters or sequences out but I'm not sure how I would get feedback from the LCD to see if the characters I output were wrote to the screen correctly. (Or if I were this equipment would cost much more than I have to spend on this) 
 
Thanks for your time,
Jeremy
0 Kudos

546 Views
peg
Senior Contributor IV
Hi Jeremy,

It would be possible to do this but to what end?
With probably a similar amount of effort you could take a demoboard that has an LCD on it and write the code from scratch to do this. If you don't have the skills to do this then you don't have the skills to reverse enginer this either.
The dissassembly process would come down to identifying the bit-banged serial port section, the character mode LCD driver part, its data and then the bit that makes it all work. It could be that the programmer has embedded the LCD data all throughout the programme which makes dissassembly difficult as it treats it all as code and the embedded data gets it out of sync.
Once you have done this you will have one working product that probably doesn't do exactly what you want and possibly without any way to change it or duplicate it.


0 Kudos

546 Views
PeterHouse
Contributor I
Jeremy,

Rule #1 - Peg and Mac are both 100% correct.

Rule #2 - Having said that . . . there is no better way to learn assembler and a microcontroller than to go through this process and complete it !!!

Rule #3 - refer to Rule #1

Here is a link to a couple of disassembler programs - I have used the IDA Pro and I have done this manually in the past on programs about the size of yours.  It is a great experience and will probably teach you a lot including a few things you may not wish to know.

http://www.hex-rays.com/idapro/idaproc.htm
http://mamedev.org/source/src/emu/cpu/m6805/6805dasm.c.html

Good Luck,

Peter
0 Kudos

546 Views
JeremyA
Contributor I
Peter  - Just got it working!!  Those links were of great help and allowed me to check the code for the control characters pretty easily, this allows for ASCII OSC and button capture  :smileyhappy:  Thanks again for your all your help it went a long way,
I'd can't tell you how appreciative I am and I'd like to send you some wine if possible... or something else? smoked salmon from the pacific northwest?
Jeremy
0 Kudos

546 Views
JeremyA
Contributor I
Peg and Peter, Thank you both for your replies -
I know it may not be the easiest thing but I think I'll go ahead and try my hardest to get it working.  Those links will sure be helpful and I think that it will give me just enough to get started :smileyhappy:
Thank you so much for your help,
Jeremy
0 Kudos