Category Archives: PicBasic Pro

ADC In (Low Level Version)

This means that when they measure an incoming voltage, they compare that voltage to a reference voltage, and give you the comparison represented as a 10-bit number (0-1023).To use the analog-to-digital converters on a PIC through picBasic Pro without using ADCIN, you need to know something about the special memory registers on the PIC related to the ADC. The registers you need are as follows (for more on these registers, see the data sheet): ADCON0 – ADC configuration register 0 ADCON1 – ADC configuration register 1 TRISA/TRISE – input/output state register for port A (TRISE is for port E, on the 40-pin PICs only) ADRESH – ADC conversion result register, high byte ADRESL – ADC conversion result register, low byte The bits of the ADCON0 and ADCON1 registers are used to set the various parameters of the A-to-D converter. Continue reading

Posted in PicBasic Pro | Comments Off on ADC In (Low Level Version)

ADC In

This example reads an analog input on PORTA.0 and sends its value out serially on PORTC.6

Posted in PicBasic Pro | Comments Off on ADC In