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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
03/06/07 19:09
Read: times


 
#134408 - Oh yeah, i forgot about that
Responding to: ???'s previous message


euuh, no....

MOV SBUF, #'A'
or
MOV SBUF,#41H

would be more appropriate, and don't forget to initialise your UART properly


Thank you for reminding me about the need of including '' between the character. I clearly remembered i read of this remember but i am not sure of the exact line.



Just read the manual of your C-compiler.

what about

sfr at 0x99 SBUF;
.
.
.
SBUF='A';
or
SBUF=0x41;

again, don't forget to initialize
(the above would be for the SDCC compiler)


That was very helpful indeed as i now roughly know how to output a single byte data to the SBUF now.

Sorry, i forgot to mention that I am using Keil uVision compiler and there is a reg51.h header to ease the programming for 8051 uC. Therefore, i think that there is no need to define the SFR of SBUF being at 0x99, am i wrong?



What's your prior exposure to programming of microcontrollers?

did you check on the definition of the MOV instruction?

if so, how many bytes can the instruction be?
How many bytes would "#ATD1234567" be?

Even in 'C' we are talking low level, byte oriented stuff.


uhm, actually i was thinking of #'ATD1234567' but now i have realized that only a byte can be sent to SBUF at any time, and the correct way would be by checking the TI flag and looping until the entire string of characters are sent. Please correct me if i am wrong.

I have done some of programming in 8051 using ASM previously but i have not deal anything with serial communication yet let alone communication with modem, and this is the second time for me to code in C since it is easier for me to code the other more complex part of my project(which could be very cumbersome if i were to use ASM)

I do know some or actually most of the basic of 8051, it is just that sometimes i might slipped and forget about things and needed to be reminded. It was 1 year ago since i last toy around with 8051 :) So please bear with me if i made any mistake in asking questions.

Thank you very much again for such a prompt and positive response!

List of 72 messages in thread
TopicAuthorDate
Serial Communication Related Problem            01/01/70 00:00      
   partial answers            01/01/70 00:00      
      Oh yeah, i forgot about that            01/01/70 00:00      
   FIRST, THEN, THEN, THEN            01/01/70 00:00      
      A little bit of sarcasm as usual but often helpful            01/01/70 00:00      
         Proper baud rate...            01/01/70 00:00      
            baud rate            01/01/70 00:00      
               calculator            01/01/70 00:00      
            modem is autobauding            01/01/70 00:00      
               Noted            01/01/70 00:00      
   Some answers            01/01/70 00:00      
      Thanks for a patience reply            01/01/70 00:00      
   Nothing to add, but ...            01/01/70 00:00      
      i second(ed) that motion            01/01/70 00:00      
         My location profile?            01/01/70 00:00      
            with this known, it would do no good ...            01/01/70 00:00      
               Radio Shack            01/01/70 00:00      
                  Even so            01/01/70 00:00      
                     I can buy it from the local electronic shop            01/01/70 00:00      
            Sarcasm            01/01/70 00:00      
               I agree            01/01/70 00:00      
      Thanks for understanding and recommendation! - NT            01/01/70 00:00      
      More info            01/01/70 00:00      
         you need to understand the parameters.            01/01/70 00:00      
            "more valid" evidently means invalid            01/01/70 00:00      
            not quite            01/01/70 00:00      
               What a wonderful example that when total crap is s            01/01/70 00:00      
                  lesson            01/01/70 00:00      
            No, it doesn't            01/01/70 00:00      
   TxD pin to TxD pin?            01/01/70 00:00      
      dte-dce-dce-dte            01/01/70 00:00      
         Noted! Thanks!            01/01/70 00:00      
            same request question            01/01/70 00:00      
      Meaning of "Transmit"            01/01/70 00:00      
   same request question 2            01/01/70 00:00      
   Initial command sending code; help me take a look!            01/01/70 00:00      
      Make it simple for yourself            01/01/70 00:00      
         Why the need of circular buffer? Receiving?            01/01/70 00:00      
            polling versus interrupt            01/01/70 00:00      
               Check OK string at RXD or DCD at interupt?            01/01/70 00:00      
                  no good            01/01/70 00:00      
                     Voice mode only! No data communication.            01/01/70 00:00      
                        you are missing the basics            01/01/70 00:00      
                           NO carrier sent after DCD didn't found            01/01/70 00:00      
                              I do not agree            01/01/70 00:00      
                                 Interupt DCD signal for clear transmission            01/01/70 00:00      
                        For Voice Dialling            01/01/70 00:00      
                           and by the way            01/01/70 00:00      
                           Sorry for multiposting            01/01/70 00:00      
                           The ";" works but...            01/01/70 00:00      
                              ";" to return to idle state            01/01/70 00:00      
                              +++ with 3 seconds no modem activity            01/01/70 00:00      
                                 +++ escape sequence            01/01/70 00:00      
                                    Monkey See. Monkey Do.            01/01/70 00:00      
                                       Now monkey also understand?            01/01/70 00:00      
                                 Are you mistaken?            01/01/70 00:00      
                                    I think so            01/01/70 00:00      
            Circular buffers            01/01/70 00:00      
               Initial code for receiving modem response            01/01/70 00:00      
                  don't fiddle with the timer, let it run            01/01/70 00:00      
                     Understood, will run TR1 in global init, thx! - NT            01/01/70 00:00      
                  check this out, Eugene...            01/01/70 00:00      
                     Ah! Didn't know that! Thanks! -NT            01/01/70 00:00      
                     Code; modem commands & responses            01/01/70 00:00      
   V.250 (formerly V.25-ter) - get it free!            01/01/70 00:00      
   code,modem command and response            01/01/70 00:00      
   system froze when connected to hyperterminal            01/01/70 00:00      
      Your code...            01/01/70 00:00      
         It should not be a hardware problem since..            01/01/70 00:00      
            Not necessarily            01/01/70 00:00      
      Just taking a stab at it...            01/01/70 00:00      
         two 'ugly' guesses            01/01/70 00:00      

Back to Subject List