how to count the 12 bit ADC count
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2010-10-03 2:41 AM
Posted on October 03, 2010 at 11:41
how to count the 12 bit ADC count
This discussion is locked. Please start a new topic to ask your question.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:09 AM
Posted on May 17, 2011 at 14:09
WriteSerial( DBG_USART, ADC_val );
Perhaps you should convert the number into ASCII before pushing it out to the serial port?
{
char buffer[32];
sprintf(buffer,''%d'',ADC_val);WriteSerial( DBG_USART, buffer ); }
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2011-05-17 5:09 AM
Posted on May 17, 2011 at 14:09
''Perhaps you should convert the number into ASCII before pushing it out to the serial port?''
Indeed! The commented-out lines suggest that she might have been trying to do that: //strcat(ADC_val,'':'');
//sprif(ADC_val,ADC_val);
But there seem to be some basic problems there with (lack of) understanding how strings work in the 'C' programming language...?
A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
A complex system designed from scratch never works and cannot be patched up to make it work.

- « Previous
-
- 1
- 2
- Next »