kranenborg
Senior Member
Hello,
Thanks to Hippy's investiations we now know that the 18X is more flexible than officially documented as it is possible (amongst others) to change its output pins into input pins. The PIC16F88 datasheet suggests that output6 & 7 when turned to inputs may actually be configured as ADC inputs, on the condition that the ADC control registers can be poked succesfully and are not overwritten by the PICAXE firmware.
Has anybody tried to do this? The reason I ask is that I would like to use a LED as both a light emitting device as well as a light-level sensor using the ADC sensor (by reverse charging and then measuring the charge decrease over a 10ms time interval, see wilf_nv's contributions on this matter; he only uses logical levels, but I want to read the analog level)
As an addition to the ADC question, has anyone tried whether the weak pullups can be enabled when the output pins are defined as inputs as well?
Of course I should have checked it myself, but I dont have the means right now
Regards,
Jurjen
Thanks to Hippy's investiations we now know that the 18X is more flexible than officially documented as it is possible (amongst others) to change its output pins into input pins. The PIC16F88 datasheet suggests that output6 & 7 when turned to inputs may actually be configured as ADC inputs, on the condition that the ADC control registers can be poked succesfully and are not overwritten by the PICAXE firmware.
Has anybody tried to do this? The reason I ask is that I would like to use a LED as both a light emitting device as well as a light-level sensor using the ADC sensor (by reverse charging and then measuring the charge decrease over a 10ms time interval, see wilf_nv's contributions on this matter; he only uses logical levels, but I want to read the analog level)
As an addition to the ADC question, has anyone tried whether the weak pullups can be enabled when the output pins are defined as inputs as well?
Of course I should have checked it myself, but I dont have the means right now
Regards,
Jurjen
Last edited: