Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
Dave Brooks
03/06/07 12:52
Read: 1125 times
Oceanside, Ca.
USA


 
#134418 - Proper baud rate...
Responding to: Eugene Yong's previous message
You stated you still don't know which baud rate to use...

Why not try the same one that the device is programmed for? (56k baud) If you haven't programmed the device yet, then why not pick a baud rate, program the device, then select that same baud rate for your communication link?

You are leaving yourself wide open to ridicule by being offended by Erik's comments.

Here's a little help, but I don't suggest you copy and paste; learn by reading...


#define MICRO_FREQUENCY 22118400L
*
*
*
void SetBaudrate( ulong BaudRate )
   {
   EA = 0;           // Disable Interrupts
   
   // Set timer 1 up as a baud rate generator.
   // -----------------------------------------
   TR1 = 0;          // stop timer 1
   ET1 = 0;          // disable timer 1 interrupt
   
   PCON |= 0x80;     // 0x80=SMOD: set serial baudrate doubler
   
   TMOD &= ~0xF0;    // clear timer 1 mode bits
   TMOD |= 0x20;     // put timer 1 into MODE 2
   
   TH1 = (byte) (256 - (MICRO_FREQUENCY / (192L * BaudRate)));
   TR1 = 1;          // start timer 1
   
   EA = 1;           // Enable Interrupts
   }



best of luck,

-db


List of 72 messages in thread
TopicAuthorDate
Serial Communication Related Problem        Eugene Yong      03/06/07 10:49      
   partial answers      Patrick De Groote      03/06/07 11:07      
      Oh yeah, i forgot about that      Eugene Yong      03/06/07 12:09      
   FIRST, THEN, THEN, THEN      Erik Malund      03/06/07 11:10      
      A little bit of sarcasm as usual but often helpful      Eugene Yong      03/06/07 12:25      
         Proper baud rate...      Dave Brooks      03/06/07 12:52      
            baud rate      Erik Malund      03/06/07 13:01      
               calculator      Dave Brooks      03/06/07 13:11      
            modem is autobauding      Jan Waclawek      03/06/07 16:04      
               Noted      Eugene Yong      03/06/07 21:00      
   Some answers      Lynn Reed      03/06/07 11:14      
      Thanks for a patience reply      Eugene Yong      03/06/07 12:33      
   Nothing to add, but ...      Joseph Hebert      03/06/07 11:29      
      i second(ed) that motion      Erik Malund      03/06/07 11:44      
         My location profile?      Eugene Yong      03/06/07 12:38      
            with this known, it would do no good ...      Erik Malund      03/06/07 12:40      
               Radio Shack      Lynn Reed      03/06/07 12:45      
                  Even so      Neil Kurzman      03/06/07 20:44      
                     I can buy it from the local electronic shop      Eugene Yong      03/06/07 20:52      
            Sarcasm      Neil Kurzman      03/06/07 20:52      
               I agree      Eugene Yong      03/06/07 20:57      
      Thanks for understanding and recommendation! - NT      Eugene Yong      03/06/07 12:35      
      More info      Russell Bull      03/06/07 22:28      
         you need to understand the parameters.      Mike Stegmaier      03/07/07 06:28      
            "more valid" evidently means invalid      Erik Malund      03/07/07 07:04      
            not quite      Patrick De Groote      03/07/07 07:29      
               What a wonderful example that when total crap is s      Erik Malund      03/07/07 07:44      
                  lesson      Patrick De Groote      03/07/07 11:43      
            No, it doesn't      Andy Neil      04/03/07 00:37      
   TxD pin to TxD pin?      Eugene Yong      03/07/07 15:31      
      dte-dce-dce-dte      Patrick De Groote      03/07/07 16:00      
         Noted! Thanks!      Eugene Yong      03/07/07 16:20      
            same request question      Jecksons Ben      03/07/07 21:38      
      Meaning of "Transmit"      Andy Neil      04/03/07 04:37      
   same request question 2      Jecksons Ben      03/07/07 21:54      
   Initial command sending code; help me take a look!      Eugene Yong      03/09/07 01:50      
      Make it simple for yourself      Russell Bull      03/09/07 02:50      
         Why the need of circular buffer? Receiving?      Eugene Yong      03/09/07 04:05      
            polling versus interrupt      Patrick De Groote      03/09/07 05:17      
               Check OK string at RXD or DCD at interupt?      Jecksons Ben      03/09/07 21:27      
                  no good      Patrick De Groote      03/10/07 02:14      
                     Voice mode only! No data communication.      Eugene Yong      03/10/07 04:09      
                        you are missing the basics      Patrick De Groote      03/10/07 04:26      
                           NO carrier sent after DCD didn't found      Jecksons Ben      03/11/07 19:54      
                              I do not agree      Patrick De Groote      03/12/07 00:37      
                                 Interupt DCD signal for clear transmission      Jecksons Ben      03/15/07 01:15      
                        For Voice Dialling      Muhammad Fauzan      03/19/07 12:33      
                           and by the way      Muhammad Fauzan      03/19/07 12:36      
                           Sorry for multiposting      Muhammad Fauzan      03/19/07 12:58      
                           The ";" works but...      Eugene Yong      03/22/07 19:46      
                              ";" to return to idle state      Muhammad Fauzan      03/24/07 16:48      
                              +++ with 3 seconds no modem activity      Charles Bannister      03/25/07 03:41      
                                 +++ escape sequence      Andy Neil      03/25/07 07:07      
                                    Monkey See. Monkey Do.      Charles Bannister      03/25/07 08:14      
                                       Now monkey also understand?      Andy Neil      03/26/07 00:26      
                                 Are you mistaken?      Eugene Yong      03/25/07 23:36      
                                    I think so      Andy Neil      03/26/07 00:24      
            Circular buffers      Russell Bull      03/23/07 00:42      
               Initial code for receiving modem response      Eugene Yong      03/26/07 10:38      
                  don't fiddle with the timer, let it run      Erik Malund      03/26/07 10:43      
                     Understood, will run TR1 in global init, thx! - NT      Eugene Yong      03/26/07 10:48      
                  check this out, Eugene...      Dave Brooks      03/26/07 10:52      
                     Ah! Didn't know that! Thanks! -NT      Eugene Yong      03/26/07 11:09      
                     Code; modem commands & responses      Andy Neil      03/26/07 11:23      
   V.250 (formerly V.25-ter) - get it free!      Andy Neil      03/26/07 14:28      
   code,modem command and response      Jecksons Ben      04/01/07 20:20      
   system froze when connected to hyperterminal      Eugene Yong      04/02/07 13:39      
      Your code...      Russell Bull      04/02/07 23:48      
         It should not be a hardware problem since..      Eugene Yong      04/03/07 01:43      
            Not necessarily      Andy Neil      04/03/07 02:42      
      Just taking a stab at it...      Chris Singer      04/03/07 10:22      
         two 'ugly' guesses      Erik Malund      04/03/07 10:44      

Back to Subject List