This is an old revision of the document!


MoCap Dev Blog

May 14, 2010

Zilog and SPI

The zilog microcontroller is a pain in the but. I've come to realize that the better products out there are the ones with good help documentation and good samples to go along with the documentation. The issue is that I purchased the zilog and an accelerometer. The accelerometer was designed to work with the basic stamp. This meant that the accelerometer only uses one wire for communications. Well, SPI works by using two wires for the communication. So, I started looking into how the accelerometer works and discovered that the chip they used actually supports SPI communication. So, I added a wire to the input line and connected it to the zilog. Now, that was the easy part. Trying to write the code that supports the SPI functionality on the zilog was a long a torturous journey. The only example the company provides is one that doesn't support this specific processor. I found someone else's code, they had posted it in a forum asking for help, and started working from that. I slowly worked out what parts of his code worked and what parts didn't. It came down to one simple line of his code where he was checking for the SPI buffer to get full? and I removed it and it works perfectly. Now I can start working on the real problem, Motion Capture.

wiki/projects/contracts/mocap/blog.1273893141.txt.gz · Last modified: 2020/11/19 14:21 (external edit)
Back to top
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0