JayAuckland
New Member
Hi, am very new to this but...
I am trying to display the position of a 10k slider pot (between the 0 and 5v rails) by storing the 08M2 ADC value as a variable then feeding that value to a serial input AXE033 display. Eventually I hope to feed that ADC level down a serial bus to several 'slave' 08M2 chips so they can react to the level of the pot in various ways.
As I slide the pot from bottom (0v) to top (5v) the LCD counts up from 000 - 255 just fine. But when moving back down it becomes erratic, showing values as high as 900... and as the displayed number descends down past 100 it jumps back to 900 and counts down in hundreds. From that point on it remains erratic regardless of whether the pot is moving up or down or what position it is at. And it never reads 000 at the bottom of the pot again... giving instead numbers in the double digit range.
An LED on the pwm out always shows a smooth transition from full off to full on and back down etc. regardless of the antics of the LCD
Can anyone tell me why I'm getting the erratic LCD readout?
(And by the way, why does the PWM dim the LED best when the period is set at 63 rather than 255 as I would have thought???)
Jay
I am trying to display the position of a 10k slider pot (between the 0 and 5v rails) by storing the 08M2 ADC value as a variable then feeding that value to a serial input AXE033 display. Eventually I hope to feed that ADC level down a serial bus to several 'slave' 08M2 chips so they can react to the level of the pot in various ways.
Code:
setfreq m4
pause 1000
serout c.0,N2400,(254,1)
pause 30
One:
readadc 4,b1
serout C.0,N2400,(254,128)
serout c.0,n2400,("Fader level: ")
serout c.0,n2400,(254,192,)
serout c.0,n2400,(#b1)
pwmout 2,63,b1
goto One
An LED on the pwm out always shows a smooth transition from full off to full on and back down etc. regardless of the antics of the LCD
Can anyone tell me why I'm getting the erratic LCD readout?
(And by the way, why does the PWM dim the LED best when the period is set at 63 rather than 255 as I would have thought???)
Jay