Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/04/08 05:33
Read: times


 
#151849 - Triple Function Even Possible
Responding to: ???'s previous message
I worked on some MCU projects where we had a single input that was connected into a potted product via a series resistor and then to another resistor to GND so as to act as a voltage divider. The divider node fed into an A/D converter channel. A signal was measured on this pin to establish a total of three operational states. The state detection was managed in a 10 millisecond interrupt service routine. There were states to:

  1. Anytime signal < 12 volts on wire. Idle state so product
    in normal operational mode.

  2. Signal pulse between between 12 and 28 volts for time of 1 to 2 seconds. Enter calibration mode. Additional pulses in fairly tight timing tolerance in same voltage range would walk the unit through a 5 to 6 state calibration state where sensors were measured at controlled conditions and stored as reference points into serial EEPROM. Anytime timing / voltage sequence violated cancel the CAL process and return to idle state.

  3. Signal on wire > 36 volts for more than 2 seconds. Enter alternate digital mode. Any excursion of input below 36 volts leave digital mode and restore normal mode in idle operation. The digital mode changed a PWM driver output signal pin into a software bit banged 19200 baud UART that sent out the device state and CAL data in a packet of some 28 bytes repeatedly at about 10 frames per second.


Michael Karas




List of 9 messages in thread
TopicAuthorDate
Dual function push button with timer in C?            01/01/70 00:00      
   Interrupt            01/01/70 00:00      
   No answer just another question:            01/01/70 00:00      
      Nothing really, just those two functions.            01/01/70 00:00      
      Dual Switch            01/01/70 00:00      
         Ah yes....that will do            01/01/70 00:00      
   discussed here            01/01/70 00:00      
   Triple Function Even Possible            01/01/70 00:00      
   of course timer            01/01/70 00:00      

Back to Subject List