




                  805B6, THE MC68HC805B6 DEVELOPMENT TOOL
                        (c) 1990 M.J. International


        1. Introduction

        This  software  package was developed as an  alternative  to 
        more  expensive  development  systems  for  the  MC68HC805B6 
        microcontroller. Motorola was very kind (and smart) to  have 
        incorporated  into this device (and most others in  the  '05 
        familly) a bootstrap program that allows easy programming of 
        the EEPROM or RAM in the device through the serial port with 
        minimal  hardware requirements. 805B6.EXE was developped  to 
        use this feature in a user friendly environment.

        This software package is composed of the following files:

            - 805B6.EXE
            - CONFIG.B6
              (this is an example you will have to modify)
            - 805B6.HLP
            - B6TEST.S19
            - B6TEST.ASM (The source code of the test program)
            - READ.ME (this file)

        To  be  used  effectively, it will also  require  a  program 
        editor  (or word processor) and an assembler which  are  not 
        provided.  A typical set-up could use WordStar as a  program 
        editor  (in  the  non-document mode), and  AS5.EXE,  a  6805 
        familly  assembler  provided  free  of  charge  by  Motorola 
        through  their  Bulletin Board. 805B6 can also  use  a  file 
        browser,  if you feel (as I do) that it is a handy  utility, 
        particularly  usefull  to review the output listing  of  the 
        assembler  before actually programming a device. But such  a 
        utility  is not absolutely required, 805B6.EXE has a  simple 
        browsing  utility that will do the job. If you want  to  use 
        the internal utility, do not use the 'Change default  Browse 
        program' command from the Utilities and Dos window menu.


        2. Hardware requirements

        These  are  very  limited. The  Serial  Bootstrap  Schematic
        Diagram described in page 3-1228 of the MICROPROCESSOR  DATA
        BOOK  dated  Q3/88 (Ref DL 139) is a good  place  to  start.

        There are a few mistakes on this schematic, that are on  the
        technical   manual  for  the  MC68HC05B6,   MC68HC05B4   and
        MC68HC805B6  (Ref. MC68HC05B6/D) as well. The most  signifi-
        cant is that the switch used to connect PD4 to either +5V or
        ground is improperly referenced. When PD4 is at ground,  the
        bootstrap routine will ERASE the EEPROMs, when it is at +5V,
        it will not.
        I  recommand connecting a 10k resistor between PD4 and  +5V,
        and using a momentary, push-button switch to ground this pin 
        when necessary. In the program, this switch is referenced to 
        as  the  ERASE switch which you are  sometimes  prompted  to 
        depress  (even  though it will only erase  the  device  when 
        pressed at the same time the device is reset with the  boot-
        strap circuit enabled).
        The  User/Bootstrap switch that you will be prompted to  use 
        at  various  points in the program refers to a  SPDT  switch 
        used  to  connect the IRQ line to either the  +5  volt  line 
        (user  position) or the bootstrap circuit allowing  the  IRQ 
        line to rise to about 9 volt at the same time the reset line 
        is brought up (bootstrap position).
        Another minor error is that PD6 is referenced twice, once on 
        the left of the drawing, which is the correct use, and  once 
        on  the right hand side, where it should read  PD0  instead. 
        The litterature does not indicate anywhere wether PD0 should 
        be  grounded for bootstrap operations, and I have  used  the 
        bootstrap  mode  with voltage applied to  PD0  successfully. 
        Maybe I was lucky, let me know if that causes problem.

        3. Installation

        First, it is strongly recommended to make a back-up copy  of 
        the program before getting started. This is a basic  operat-
        ing  procedure,  but some users are so anxious  to  try  new 
        things that they sometimes forget that important step.

        This program has been designed so that it can reside in  any 
        subdirectory, but be used from various subdirectories,  each 
        for a different application. The 805B6.EXE and 805B6.HLP may 
        reside  in  the same directory, even though it  is  not  re-
        quired.  As  long  as the subdirectory  where  805B6.EXE  is 
        located  is specified in a PATH command in the  AUTOEXEC.BAT 
        file,  you will be OK. The program will allow you  to  enter 
        the location of the 805B6.HLP file from the Utility menu.

        The  recommanded set-up is where a specific subdirectory  is 
        used  for  a specific project. By calling  805B6  from  this 
        subdirectory,  you  will be able to  configure  the  default 
        settings  for this particular project. 805B6 will store  the 
        default settings in a CONFIG.B6 file in this subdirectory.

        The default set-up allows for limited customization (see the 
        Help screens). If it is not sufficient for your application, 
        you  can always develop batch files doing the job  and  call 
        these  batch files from within 805B6.EXE. A good example  is 
        when  an  assembler  like the  Motorola  Portable  Assembler 
        (PASM)  is  used. This assembler is very powerful,  and  re-
        quires the use of a linker to create an executable file.  In 
        this  case,  it would be more convenient to create  a  batch 
        file  calling  the assembler, then the linker,  and  specify 
        this  batch file as your assembler in the set-up section  of 
        805B6.EXE.

        Before  starting installation, you may print  the  805B6.HLP
        file.  The information contained in this file is a  rudimen-
        tary  context  sensitive  help (very  rudimentary)  that  is
        accessible  from  within  the  program.  However,   browsing 
        through it before getting started will help.

        If you run the program for the first time from a new  direc-
        tory,  you should go to the set-up screen. The program  will 
        not  run  properly  until the set-up  information  has  been 
        entered. This information is then stored in a CONFIG.B6 file 
        in  the subdirectory from which the program was  called.  If 
        you create several subdirectories, one for each project, you 
        will  have a CONFIG.B6 file in each. One advantage  of  this 
        method is that the CONFIG.B6 file will remember the name  of 
        the last file used (for assembly, or device programming), so 
        that  you will not have to re-enter the name every time  you 
        make  a change to your program, and want to re-assemble  and 
        re-program the device.
        Note: Once information is entered through the set-up screen, 
        you are only allowed to change it. There is no way to remove 
        an  entry  from within 805B6.EXE. If you want to  remove  an 
        entry,  you will have to edit CONFIG.B6 with a  text  editor
        (the  only case where that would be required is if you  have 
        entered the name of a file browser, and then want to  delete 
        it  to  use  the  internal function).  All  the  entries  in 
        CONFIG.B6  are of the type: 'entry=filename'. A space  where 
        the program expects a filename will create an error. So,  if 
        you delete an entry, be sure to leave no blank space between 
        the = sign and the carriage return.

        4. Command mode

        The  program can be used as a loader from the  command  line 
        without  having  to go through the menus. It will  accept  a 
        file  name with a S19 or HEX extension, but in the  Motorola 
        S19 format exclusively.
        Example:
                805B6 test.s19, or 805B6 test.hex
        will  get  you directly to the  serial  programming  section 
        without  questions  asked, and will return you  to  the  DOS 
        prompt when finished.
        Some  assemblers (and at least one C compiler) generate  S19 
        files that include addresses outside the range specified  in
        the assembly file. This will not bother 805B6.EXE which will 
        just  ignore the addresses outside the EEPROM1,  EEPROM6  or 
        RAM locations. 
        The command mode is intended to be used for EEPROM  program-
        ming exclusively.

        5. Bibliography

        I would not recommand attempting to develop software for the 
        68HC805B6  without  good litterature at  hand.  The  minimum 
        required is the data sheet referenced MC68HC05B6/D. The HC05 
        application  guide (Ref. M68HC05AG/AD) is a  good  reference
        too, as would be any 6805 family documentation. All the  '05
        devices  use the same instruction set (with very few  varia-
        tions)  and  most routines developed for one device  can  be
        easily  adapted to another device. The 68HC805B6 is  one  of 
        the most powerful devices in this family, having most of the 
        features found in other devices. Only the Serial  Peripheral 
        Interface  is  missing.  Fortunately, this  is  the  easiest 
        feature  to implement in software (try to make an  A/D  con-
        verter 100% in software!).

        6. Final note

        In  spite of its simplicity (and minimal  cost),  developing 
        applications with the above described hardware and  software 
        is  fast,  convenient and powerful. Of course you  will  not 
        have  break  points,  unless you implement  them  into  your 
        software.  But the convenience and speed of the erasing  and 
        programming  process will allow you to modify and test  your 
        program in about a minute (for a 1 to 2 kbyte program).  You 
        may  even be able to do this in the user environment if  you 
        have  provided  access to the SCI and I/Os used  for  serial 
        bootstrap. This beats any development system I know.
        I have used this set-up to develop home projects as well  as 
        professional  applications (it was taking too long  to  have 
        the budget for a full blown development system approved, and 
        the customer could not wait).

        7. What about the future?

        A  similar software package for the 68HC805C4 is  being  de-
        veloped. This one requires more work because the device  has 
        less capability built in the bootstrap firmware. It will  be 
        a  more user friendly alternative to the PROG7 package  pro-
        vided  by  Motorola with the 68HC705C8 kit. It works  and  I 
        have  actually  developped it before 805B6, but it  needs  a 
        little  finishing before it can be released. Other  products 
        may  follow depending on user's feedback on  these  products 
        (what I mean by user's feedback is explained in the  follow-
        ing paragraph!).

        8. Registration

        Of course, I strongly recommand you register if you use  the
        software.  Not only this will allow you to sleep better  (if
        you have a conscience) but it will also allow me to continue
        in  this  course. Whether you register or not,  I  will  pay
        attention  to any comment I receive about this  package,  my
        goal being to improve it and also improve other products  in
        development.  If there is enough interest, I may  develop  a
        programming  board  allowing users to have a  clean  working
        unit that could be used in a variety of ways. Let me know if
        you are interested.
        As  the  opening screen indicates, the registration  can  be
        done  at two levels. The first level gives you the right  to
        use the software as is. The second level gives you access to
        the source code of the program itself, written in QuickBasic
        4.5, and limited rights to modify it for your own  personnal 
        use. You will have no right to use part or all of the source 
        or object code in a product you sell or otherwise get  money 
        for.

        Have fun with the 68HC805B6!





                            M. J. INTERNATIONAL

                             REGISTRATION FORM
                               (PLEASE TYPE)

        NAME: ______________________________________________________

        COMPANY: ___________________________________________________

        ADDRESS: ___________________________________________________

        CITY, STATE, ZIP: __________________________________________

        DATE: ______________

        PRODUCT: ___________________________

        LEVEL (CHECK WHICH APPLY):
        LEVEL 1 ($25): ____            LEVEL 2 ($50): _____
                     (ENCLOSE CHECK WITH PROPER AMOUNT)

        INTENDED USE (PERSONNAL, PROFESSIONAL, EDUCATIONAL, OTHER):
                           (FOR INFORMATION ONLY)

        ____________________________________________________________

        ____________________________________________________________

        ____________________________________________________________

        WOULD YOU LIKE TO BE ADVISED WHEN 805C4.EXE IS AVAILABLE:
        YES: _____     NO: _____

        WOULD YOU BE INTERESTED IN A PROGRAMMING BOARD:
        YES: _____     NO: _____

        OTHER COMMENTS AND SUGGESTIONS:

        ____________________________________________________________

        ____________________________________________________________

        ____________________________________________________________

        ____________________________________________________________

        ____________________________________________________________


        SEND TO:        M. J. INTERNATIONAL
                        P. O. BOX 4037
                        FORT WALTON BEACH, FL 32548

