Alkex Posted November 16, 2005 Report Posted November 16, 2005 Hi there!I got my hands on a broken CASIO DG20 I'm currently "MIDIBOXING"The rubber fretboard conducts electricity and resistance varies proportionaly to distance between 2 probes!!So it looks like I've got a Ribbon controller here!!Here is the problem so far:I'm using the AIN_VALUE_7BIT function to define a lader for the notes but in 7bit, the resolution is too small, thus causing fret to play neighboor notes randomly.Is there a method to convert the AIN reading into a 0-->255 resolution rather than 0-->127 or possibly even higher?I could monitor the readings on an lcd and therefore have a more precise design!Thanks for any help as I'm still beginning PIC MATHS!Alex Quote
raphael Posted November 17, 2005 Report Posted November 17, 2005 If you use the MIOS_AIN_PinGet function you will get the full resolution of the ADC (10Bit).Raphael Quote
Alkex Posted November 17, 2005 Author Report Posted November 17, 2005 Hi Raphael,thanks for the hint!Could you tell me which function to use to display the entire 10bit number on lcd for further comparing/handling?thanksAlkex Quote
raphael Posted November 17, 2005 Report Posted November 17, 2005 I would try MIOS_LCD_PrintBCD4 (but I never used it myself). Quote
Alkex Posted November 18, 2005 Author Report Posted November 18, 2005 thanks but I dont really know how to work with numbers higher than 255...I'll try to experiment differant ways...all the best! Quote
TK. Posted November 18, 2005 Report Posted November 18, 2005 Try the C wrapper, the programming effort will be much lowerBest Regards, Thorsten. Quote
Alkex Posted November 20, 2005 Author Report Posted November 20, 2005 Hi thorsten,I was thinking about that for some time, but never had the courage to "make the leap" ::)I'll give it a shot!Best regardsAlex Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.