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

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
09/28/09 08:40
Read: times


 
#169215 - INTSIO?
Responding to: ???'s previous message
Ralf Altman said:
I have seen in INTSIO example project:

What "INTSIO example project" ?

If you're going to refer to an online resource, always give the link to it - don't just assume that people will just automatically know what you're talking about!

I assume (dangerous, I know) that you mean this: http://www.keil.com/download/docs/71.asp

Note that there is also a "v2" available: http://www.keil.com/download/docs/200.asp

I thought I have to use buffer when send and receive to avoid data being missed

Not necessarily:

* To avoid data being lost when sending, you just need to ensure that you do not load the next byte into SBUF before the previous one is done;

* To avoid data being lost when receiving, you just need to ensure that you have read the byte from SBUF before the next one arrives (and overwrites it).

Of course, the easiest way to acheive this is to use buffers!

What the INTSIO and INTSIO2 examples provide is an interrupt-driven and buffered "driver" which can be used by printf, putchar, getchar, etc:

http://www.keil.com/support/m...asicio.htm
http://www.keil.com/support/m...printf.htm
http://www.keil.com/support/m...utchar.htm
http://www.keil.com/support/m...etchar.htm

Your only concern then, is that you do not over-fill the buffers; and functions - or "API calls" - are provided to enable you to avoid that.

Thus, with the interrupt-handlers and buffers taken care of, you can concentrate on just receiving characters with getchar, etc, and sending characters with printf, etc.

List of 38 messages in thread
TopicAuthorDate
RS232: Sending data to PC from 8051 MCU - Please help!            01/01/70 00:00      
   What problems have you encountered?            01/01/70 00:00      
      Re: What problems have you encountered?            01/01/70 00:00      
         Q: How can I eat a whole whale?            01/01/70 00:00      
         There are examples and serial I/O tutorial information            01/01/70 00:00      
            Re: There are examples and serial I/O tutorial information            01/01/70 00:00      
               If you're using Keil            01/01/70 00:00      
               I have only seen some in assembly            01/01/70 00:00      
                  Re: RS232 discussion on Keil & 8052 website            01/01/70 00:00      
                     Hello, World!            01/01/70 00:00      
                        Re: Hello, World!            01/01/70 00:00      
                           why on earth?            01/01/70 00:00      
                           As Erik says            01/01/70 00:00      
                              Re: As Erik says            01/01/70 00:00      
                                 Just extend single-char routine            01/01/70 00:00      
                                 pseudo code            01/01/70 00:00      
                                    bufgfers            01/01/70 00:00      
                                    Re: circular bufgfers            01/01/70 00:00      
                                    Re: pseudo code            01/01/70 00:00      
                                       what is this            01/01/70 00:00      
                                          Used size            01/01/70 00:00      
                                          Can you give me any simple code, please?            01/01/70 00:00      
                                             first            01/01/70 00:00      
                                                RE: first            01/01/70 00:00      
                                                   why not directly to where you anyhow need to be eventually            01/01/70 00:00      
                                 INTSIO?            01/01/70 00:00      
   A note on using printf            01/01/70 00:00      
      How to set BAUD rate to 19200, timer 3 for ADuCxxx?            01/01/70 00:00      
      Is that OK to use printf to send data to PC like this?            01/01/70 00:00      
         Are you listening to anything that's been said here?            01/01/70 00:00      
            Re: Are you listening to anything that's been said here?            01/01/70 00:00      
               ADC read function just stop working            01/01/70 00:00      
               far better efficient and organise            01/01/70 00:00      
                  Thanks            01/01/70 00:00      
                     The trouble I have is I am running out of time            01/01/70 00:00      
                        This is what happens when you do somebody's work for them            01/01/70 00:00      
                           Re: This is what happens when you do somebody's work for the            01/01/70 00:00      
                              Then use the resources available to you!            01/01/70 00:00      

Back to Subject List