file: k1info
Subject: Cheap MC68HC705K1 Programmer!
Newsgroups: sci.electronics,comp.robotics
Distribution: usa
Keywords: microcontroller mc68hc705k1


I've posted about some work I've been doing to develop an
easy-to-build and inexpensive programmer for Motorola's MC68HC705K1
microcontroller.  I have placed the file k1pgm.zip on the Circuit Cookbook 
FTP site at bode.ee.ualberta.ca.

The design goals for the programmer were for it to be inexpensive, 
reliable, inexpensive, easily reproducible, and inexpensive.  Details about 
the programmer:

Overview:

   The K1PGM is made to program the Motorola MC68HC705K1 8-bit
   microcontroller.  It connects to the PC parallel port and requires an
   external 9VDC supply (a wall transformer works well).  Vcc (5V) and Vpp
   (16.5V) are generated on the board from the supply.  Software is
   available from Motorola's Freeware BBS (512-891-3733) to program,
   verify, blank check, dump eprom contents, etc. using the K1PGM.

   The 'K1 is a tiny 8-bit controller with 504 bytes EPROM, 28 bytes RAM,
   10 I/O pins, and nice interrupt and timer capabilities.  The EPROM
   version is currently available at Active (800-677-8899) for $19.95 in
   singles.  This is the XC68HC705K1S.  The OTPROM version (XC68HC705K1P)
   is still a little hard to find.  I checked today and JDR had them for 
   $7.95.  When available, you can get them from places like Active for 
   $3.35 in pretty small quantities (even singles - but shipping makes that
   unreasonable).  It also comes in an OTPROM SOIC package ('K1DW).  The 
   'K1 became fairly popular with net types when they offered the KICS 
   programmer/simulator kit for $50 awhile back.  Unfortunately, that deal 
   is no longer available.  Note that many places still use the
   "experimental" notation (i.e. XC705...) while others use the normal
   MC705... notation.  If you try to order and they can't find the part
   number you give then try the other notation.

   The 'K1 is, in my humble opinion, a wonderful way to get started with
   microcontrollers.  A GREAT resource is the book that comes with the KICS
   titled "Understanding Small Microcontrollers".  This book is
   available from Motorola literature at 800-441-2447.  It isn't cheap
   though - $31.30.  They offer a "student price" of $25.05.  I'm not sure
   what evidence you have to present to get the student price.  One guy I
   am putting a kit together for said that he got the book from
   Morotola for FREE!  I don't know if this was a mistake or what, but it's
   worth a try.   Another idea might be Motorola's university support - 
   call 602-952-3855.  The book introduces small microcontrollers in 
   general, with specific examples using the 'K1.

   You can get the data book at the same number.  I think it is free - or
   at least real cheap.

K1PGM Design Details:

   Uses a reasonably simple single-sided board.  I felt that to make the
   K1PGM inexpensive and easily reproducible, it had to have a single-sided
   PCB.  The biggest design compromise to make this happen was the
   elimination of a DB-25 connector on the K1PGM itself.  Instead, the
   connections to the PC parallel port are simply hard-wired to pads on the
   board with a 25-pin connector on the other end for the PC.  Eliminating 
   the right angle DB-25 also knocks a big chunk off of the cost.  The
   easiest way to get a cable is to take a printer cable and hack off one
   end.  Definitely better than trying to solder a bunch of wires into a
   solder-cup DB-25.  Incidentally, the board measures 2.25" by 2.5".  Some 
   pathetic ASCII art:

			      K1PGM
			      _______
			      |     |
		|--\__________|     |
   To PC // Port|   ----------|     |_________ 9VDC
	        |--/	      |_____|


   Uses a TL497 switching regulator to generate Vpp (16.5V) from the 9VDC
   supply.  The TL497 is cheap (79 cents at BG Micro) and easy to find.
   The design in the data book used a Motorola part that I couldn't find in
   quantities less than 50 and was around $2.  A 78M05 provides Vcc.

   Uses parts that are all easily obtainable form the usual mail-order
   sources.  Everything can be gotten from B.G. Micro, Digi-Key, and
   Mouser.  The TL497 and the micro SPDT are the only things that aren't 
   available from all three.  The TL497 is only at B.G. Micro (and other 
   places  - just not Digi-Key and Mouser).  I could only find the switch
   at Mouser.  You could change the spacing on the artwork and use another
   at the risk of botching up the board.

Assembler:

   One assembler that I know works is casm05.exe off of the Freeware
   BBS.  You just have to remember to use an ORG $0200 to put the code in
   the right place.

How To Build One:

   I have put a together .zip file that has the schematic, basic 
   instructions, flipped and normal PCB layouts, and the software from 
   Motorola's Freeware BBS.  The schematic and PCB layout files are 
   Postscript(tm) and HPGL.  The file, k1pgm.zip, has been placed at the 
   Circuit Cookbook FTP site at bode.ee.ualberta.ca.  I am also still
   offering kits to netters for $27.


				Wally Blackburn
				wrb@cbnews.att.com
