??? 08/15/07 17:55 Read: times |
#143310 - Your adc value must be 123. { Responding to: ???'s previous message |
is the ASCII character of 123 ;-))
Use a potentiometer then you should see all the other character too ;-) Ok, I guess you got allready all relevant information to fix the problem ? Lets try to create some C code that will do the job. void result_2_dsp (uint16_t adc_value) { uint8_t adc_value_array [5]; uint8_t m = 4; do { adc_value_array [m] = '0' + adc_value %10; adc_value /= 10; }while (m--); while (m != 4) print (adc_value_array [++m]); } You got it ? read Neil's explanation, this is all you have to do. Of course, this routine is made for integer values but I think you can change it for your needs. Don't forget to move the cursor to the home position (or any other location)!!! Lets try to understand your "print function". The result in adc_sum seems to be 123 and this is equal to { in ASCII. Can you see it ? Your display simply accepts single character and not an integer value. The single character for 0...-9 must be in ASCII, means 9 = 39. The function "result_2_dsp" is allready taking care of this. Try to understand it. It might be a good idea to use a C book to find out. Good luck. PS: did you understand the "delay loop discussion" ? |
Topic | Author | Date |
ADC Problem | 01/01/70 00:00 | |
Circuit ? | 01/01/70 00:00 | |
Clarify? | 01/01/70 00:00 | |
Crosspost | 01/01/70 00:00 | |
Clarification | 01/01/70 00:00 | |
Still no circuit | 01/01/70 00:00 | |
Power supply | 01/01/70 00:00 | |
What about the adc lowbyte ? | 01/01/70 00:00 | |
Power Supply | 01/01/70 00:00 | |
Power supply | 01/01/70 00:00 | |
Power Supply | 01/01/70 00:00 | |
ADC lowbyte | 01/01/70 00:00 | |
sorry for confusing you but | 01/01/70 00:00 | |
Thanks for the time | 01/01/70 00:00 | |
mmmhhh one more time | 01/01/70 00:00 | |
LCD code | 01/01/70 00:00 | |
No majic | 01/01/70 00:00 | |
delay | 01/01/70 00:00 | |
Writing Timing Loops in C | 01/01/70 00:00 | |
Lucky | 01/01/70 00:00 | |
Very true! | 01/01/70 00:00 | |
Your adc value must be 123. { | 01/01/70 00:00 | |
Power Supply Problem | 01/01/70 00:00 | |
We can not see what you are looking at | 01/01/70 00:00 | |
current limiting power supply? | 01/01/70 00:00 | |
Power Supply | 01/01/70 00:00 | |
Power Supply | 01/01/70 00:00 | |
ADC0804 with 8051 | 01/01/70 00:00 | |
Start a new thread! | 01/01/70 00:00 | |
Sorry Dude!!!![]() | 01/01/70 00:00 |