AXE200 28X2 module ADC Setup

misellers

New Member
I'm using a AXE200 28X2 module to drive a L298 motor driver. Everything is now working but I want to be able to monitor the current through each motor using the voltage across two .5 ohm resistors on the current sense pins.

The inputs are on pin A.3 (ADC3) and B.4(ADC11), virtually all the pins between are outputs, the manual says something about having to set ADC sequentially, will this mean I can't use B.4(ADC11)? ADC0 & 1 are available but would mean using an additional jumper wire which I'd rather avoid. What ADCsetup & readADC command do I need, what would happen if I attempt to read B.4 without an ADCsetup command?

Thanks in advance.
 

nick12ab

Senior Member
I'm pretty sure nothing bad happens if you don't use the ADCSETUP command but the input driver might interfere wth readings slightly and ADCSETUP disconnects those.

You say you have the AXE200 which uses a PICAXE-28X2-5v but you can double-check if you want
  • "PIC18F2520" - it's sequential and it's a PICAXE-28X2-5v
  • "PIC18F25K22" - it's not sequential and you have the better universal voltage version which is called the "PICAXE-28X2"now
 

westaust55

Moderator
Have a read of the section on Individual Pin Masking for the ADCSETUP in PICAXE manual 2 (currently V7.7) page 30 if using the newer X2 parts.
Older X2 parts use the Sequential Masking as covered on page 31.

As Nick12ab states,
but the input driver might interfere with readings slightly
if you do not use the ADCSETUP command, you do not disconnect the digital input part of the PIC circuit which may lead to some discrepancy but will not cause chip damage.
 

misellers

New Member
Thanks for the reply I do have the xx2520 chip.

Page 30 .."With sequential masking pins can only be configured for analogue readings if:
- the internal pin of the microcontroller supports analogue (see pinout)
- the pin is already configured as an input
- all ADC with a lower number are also enabled"

So if I'm reading this right before I can enable ADC11 with: adcsetup = 8, I'd have to enable all the lower ADCs and to do that they would have to be configured as inputs which as they are needed as outputs wouldn't work.

Am I reading this right?

Thanks
 
Top