Shop OBEX P1 Docs P2 Docs Learn Events
clock question — Parallax Forums

clock question

Steve AndruesSteve Andrues Posts: 29
edited 2009-08-10 02:46 in BASIC Stamp
I·currently have a project running a Dallas Semi DS1302 RTC.· Now that I have all of the timekeeping issues fixed I wish to add an ADC to the project.· The ADC I want to use is the MCP3208.· The DS1302 already has a pin defined as Clock.· Is there any reason why I cannot use this same pin to drive the clock on the ADC?· Uncommitted pins in this project are getting to be sparse.
Any help will be greatly appreciated.

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-08-10 02:46
    Both the DS1302 and the MCP3208 use what's known as an SPI interface. This tends to vary a lot from device to device, but, at its heart, there's a chip select which has to be unique for each chip. There's a clock line which can be shared among chips. There's also one (in the DS1302) or two (in the MCP3208) data line(s). I'd connect the single I/O pin from the DS1302 to the Din line of the MCP3208. The Stamp will use 3 I/O pins (for Clock, Din, and Dout) plus two chip select pins (one for each). I'm not sure if you can share one I/O line for the MCP3208's Din and Dout lines. I'd need to go through the datasheet very carefully to make sure Dout is a high impedance when Din is being used.
Sign In or Register to comment.