Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Sponsor

controlSUITE™ software
Comprehensive.
Intuitive.
Optimized.

Real-world software for real-time control. Details Here!

Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | BasicX | how pass ADC contents to Timer/Counter

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 )