Discussion forum for the BasicX family of microcontroller chips.
how pass ADC contents to Timer/Counter - antoniod_arienzo - Jan 28 7:18:09 2008
Hello, my new group!!!
I write from Italy, so excuse my grammar mistake...
I' ve already a nice question for you...
How can I pass the contents of ADC's registers (ADCH and ADCL in
particular) to Timer/Counters' OCRs (Output Compare Registers) directly
(not using RAM storage)?

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )
Re: how pass ADC contents to Timer/Counter - Tom Becker - Jan 29 15:04:25 2008
> How can I pass the contents of ADC's registers to [] OCRs...
The ADC registers don't appear to be directly available to BasicX
code, but you can do this:
dim iX as integer
iX = GetADC(pin) ' get 10-bit ADC conversion
register.OCR1AH = iX \ 256 ' set high byte
register.OCR1AL = iX mod 256 ' set low byte
Tom

(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )