Sooty Solutions - Burnaby BC Consulting Company - Advising Business Managers on Security, Information Technology, Business Process Performance, & Best Practices
Sooty HomeContractors are BetterThe Sooty ApproachLong Range PlanningThe Sooty PartnersContact Us
   

68HC11F1 Install - Talker

Quick Links
 
  Background
  Microcontrollers
  Vacuum Pumps
  Vacuum Chambers
  Noble Gases
  Power Supplies
  Vacuum Gauges
  Plasma Tests
  Theory
  Simulators
 
 

JBug11

Motorola provided a free DOS program called PCBug11 for loading RAM and EEPROM in 68HC11x chips. PCBug11 only works on very old 32 bit computers because it uses a counting loop to estimate CPU speed. Anything over 1Ghz returns 0 (as in divide by 0 crash). The sources (probably Borland Pascal) were never released so over the years there have been many replacements of which JBug11 is probably the best.

JBug11 runs fine under Window 7 on a modern high performance gaming PC (mine is water cooled). Current computers are all USB and SATA centric: no COM, no parallel port, no IDE disks, no floppy disks. You need to load the drivers for your USB to RxTx adapter and make sure the driver also supports "break" character (some don't even if the USB chip does).

TalkerJF1 contains both the source and S19 "load image" for Sooty's special version of the EEPROM talker. If you want to make changes you'll need to run the AS11 assembler (included). AS11 is and ancient piece of software that only runs in a 32 bit DOS environment. Luckily there are lovers of old DOS games that maintain an emulator called DOSBox.

Install DOSBox, copy the TalkJF1 directory out of the zip to C: (note that all file names must be 8 characters or less in DOS), inside the DOSBox "mount c C:\TalkJF1" then "C:" and you can now run the TalkJF1.bat to assemble a new version of TalkJF1.asm.

M6811DIS contains a disassembler that attempts to convert *.BIN files into 68HC11 source code. If you unload a chip ROM into a binary memory image (BIN file) you can decode the contents into 68HC11 ASM (assembler) mnemonics. It is multi-pass and does a pretty good job of identifying data areas, labeling jump targets, and subroutine returns. It does not give you a compileable source code and going from its listing to source code (reverse engineering) is a lot of work. Runs in DOSBox on Windows PCs.

Running DOSBox:
    
    (click the image to enlarge)

Bring up JBug11 and under:
"Settings" ->
    "General" set the MCU type to "11F1"
    "COM" set to either COM1 (old 32 bit PC) or COM4 (for a USB/RxTX)

...the USB adapter driver probably put the first "device" at COM4. If you're not sure bring up "Device Manager" from the Windows "Start" and see what is under "Ports (COM & LPT)"

On the upper left there is a "switch" icon (under "file"). Click that to prepare the connection then power fail restart the 68HC11 to complete the connection:

    

Now you can overwrite the EEPROM with the TalkJF1 talker.
1) R BPROT=10............................. Unprotect the EEPROM for overwrite
2) EBULK..................................... Bulk erase the EEPROM
3) LD "C:\TalkerJF1\TALKJF1.S19".... Upload the new EEPROM image
4) R BPROT=1F............................. Protect the EEPROM from accidents

    

To be sure the new image has taken verify the contents:
5) L FE00 FFFF............................. List memory from $FE00 to $FFFF

    

On the next page there will be some limited explanation of the changes need to make the talker work in EEPROM. From the dump you can see there is talker code much like the RAM code shown when the JBug11 first connected except it starts at $FE00. You should also notice some non-zero bytes from $FFD8 to $FFFF. These are jump vectors for the service routines in the talker. The RAM talker also has vectors at the "top" of its range except the RAM talker range is only 256 bytes so it will fit in all 68HC11 chip types.

You now have an EEPROMed talker so change to "Single Chip" boot by floating the MODB line. Recall this mode should have A=0, B=high.

Power fail the chip and you can now send commands to your EEPROM talker using programs developed and run from the PC.

The examples I've used on the next page are in Java because it is possibly the most difficult language to use when you are communicating with a microcontroller. Using a language that does not have an "unsigned byte" type when you are trying to send bytes up a wire presents a particularly interesting challenge.