Wednesday, August 30, 2006
Step 1: Create a flash programmer
So I got a few Z8's yesterday. First step was to create a mess of wires and plug it into the computer to see if I could get it to work. A little bit of prototyping board, a LED to actually test if it was programmed (I created a short blinking Z8 program), and whoosh.. It worked. Well, okay, this was the second attempt. In the first attempt, I had a bit of a problem getting the voltage right. These chips are 3.6V max. It took me a bit to get the voltage regulator working, and in the process, I burned out one of the LED's. It is now putting out 3.3V solid from a 10V wall wart.
I think next step is to solder a board with DIP socket (I only have a 40pin socket, but oh well, it will just use a bit more real estate), and include some pins for the debug port (Only requires an extra 10K resistor, and 4 pins to plug into the Z8 smart cable.)
After that will probably be getting comms up. Probably a ways off though.
Okay, I decided to go ahead and get the soldering iron out. You can see the result here. Yeah, I did end up using the 40PIN dip socket, it actually doesn't look too bad. On the top left side of the board in this picture, you can see the pins to which the in circuit debugger/flash programmer attaches (It's easier to see in the full picture version). I decided to not add any LED's, since I plan on actually using this board to attach to try and get my serial link up. I've still got to do a little more research. I may want to add a buffer chip between the Z8 and the host computer. The dev board uses a MAX3222 chip between the serial inputs and the UART pins on the Z8.
Here what everything looks like when the Z8 smart cable in-circuit debugger/flash loader is attached. I went ahead and loaded the LED flash program, and checked to make sure it was running with a multi-meter. Tick-tock. Tick-tock went the multi-meter indicator. It appears to work. I am a bit concerned about the voltage. The resister tolerances on my protoboard put the voltage a bit lower than the resisters I used here. I measure the voltage going into the Z8 at 3.5V; the chip has an absolute max at 3.6V. I guess it should be okay. If not, ah well. I can probably add another 10K ohm resistor to reduce it just a little more if I blow this chip.
If I decide to move up, there is a 40 pin Z8 with 64K instruction space, and 4K RAM ($6.80/unit though). I don't think I need that much horsepower though. I think the 8K instruction + 1K ram should get me by for now.
And it comes with it's own free C compiler? Wowzie! Adrian! Take a LOOK at this bad boy! This chip is hotter than the 16F877A that I'm using at nearly on-third the price and you don't pay for development software.
The downside is that if you use both of 'em for PWM you don't have a timer left for a timed interrupt like if you wanted to, say, monitor where you were in the xy plane every 50 milliseconds.
Me confused. ;)
I think I've got my pinout architecture now. I guess I'm glad that I got the 28 pin chips; I will be using every pin to drive a 2 axis, 2 extruder head device, with a penup/pendown control line and hardware flow control serial line.
Each motor would use 1 limit detection input, 2 position sense inputs, and 2 H-Bridge outputs. The two extruder heads will share the limit detection (head out of material sensor.)
The Z-Axis controller will only need to control one motor, so it will be more simple.
Links to this post: