Shop OBEX P1 Docs P2 Docs Learn Events
Voltage splitter — Parallax Forums

Voltage splitter

RsadeikaRsadeika Posts: 3,839
edited 2008-07-30 18:41 in General Discussion
I was thinking of using a voltage splitter circuit to measure the charge state of a battery which is 6V. What I need·are some ideas of how to accomplish this using SX/B, if it can be done. I am also thinking along the lines of placing the code in an interrupt, so the state of the battery can be monitored constantly. This is a new concept for me, so I am totally in the dark about how to accomplish this.

Thanks

Ray

Comments

  • PJAllenPJAllen Banned Posts: 5,065
    edited 2008-07-30 18:33
    SX/B, from Rev 1.51 on, has a (new) command, ANALOGIN.· Look it up in SX/B Help, there's an example circuit to go with it.
  • JonnyMacJonnyMac Posts: 9,215
    edited 2008-07-30 18:41
    If you're already using Interrupts you can find ISR-based ADC code in Guether Daubach's book, "Programming the SX Microcontroller."
Sign In or Register to comment.