Author Topic: sbc65ec and ior5e  (Read 5547 times)

maccardo

  • Newbie
  • *
  • Posts: 5
    • View Profile
sbc65ec and ior5e
« on: April 03, 2007, 04:19:21 PM »
I have been going through the examples and these forums to get an understanding on the sbc and ior5e. I have started with the tcpip2 example from v243. Have been able to integrate setting relays and building a command parser. I now would like to move onto digitizing analog data. I have looked at the webserver application but find it a bit big to dig into and the fact it does not use the ior5e directly (what I mean by that is it configures all analog channels where as the ior5e only supports 5 analog inputs). Is there a simple example of doing a/d conversions at 10 bits with 5volts  range on the ior5e?

TIA

Marco

Bishop2K

  • Sr. Member
  • ****
  • Posts: 38
    • View Profile
Re: sbc65ec and ior5e
« Reply #1 on: May 03, 2007, 04:19:34 AM »

I'm looking at doing exactly the same thing and am about to move into it now.  Perhaps we should share our experiences with it.

I will be using a few different sensors, but will start off with a simple LM35 temperature sensor and 82K resistor circuit.  It should range from .20V (20 degrees) to .36V (36 degrees) which will test the sensitivity of the A/D convertors on board.

maccardo

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: sbc65ec and ior5e
« Reply #2 on: May 06, 2007, 07:22:30 PM »
Sure, would not mind at all sharing. The biggest challenges I had were getting my head around programming the logic is such a manner as to support "cooperative multitasking" once I did this my command parser worked out not to bad. Also getting the code to produce sensible results for 10bit conversions. Looked like the compiler does not do a good job promoting intergers up when bit shifting so I resorted to doing it the long way:
:
:
#elif defined(APP_USE_ADC10)
//AdcValues[adcChannel] = ((WORD)ADRESH << 8) || ADRESL;
AdcValues[adcChannel] = (WORD)ADRESH*256 + (WORD)ADRESL;
#endif
:
:


Bishop2K

  • Sr. Member
  • ****
  • Posts: 38
    • View Profile
Re: sbc65ec and ior5e
« Reply #3 on: May 06, 2007, 08:30:54 PM »

OmarZ

  • Hero Member
  • *****
  • Posts: 243
    • View Profile
Re: sbc65ec and ior5e
« Reply #4 on: May 07, 2007, 09:52:23 AM »