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

Back to Subject List

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


 
#124734 - Some Help
Responding to: ???'s previous message

Set a timer up for the proper buad rate. You may need to make it high priority if you have busy interupts.

Note you can use a delay loop, or a timer with no interupts

on the interupt....
switch(tx2_state)
{
   case 0:	 // tx not in progress
	break;
   case 1:	 // send start Bit 1
	TX2_BIT = SPACE;
	tx2_state++;
	break;
   default:  // states 2,3,4,5,6,7,8,9 data bits lsb first
	TX2_BIT = (tx2_byte & 0x01)?MARK:SPACE;	// send LSB
	tx2_byte = tx2_byte >> 1;	        // shift for next Time
	tx2_state++;
	break;
   case 10:	 // send stop Bit 
	TX2_BIT = MARK;
	tx2_state++;
	break;
}


translate to asm and you are done.
enjoy




List of 54 messages in thread
TopicAuthorDate
software UART Code            01/01/70 00:00      
   yeah,its a little game we play round here...            01/01/70 00:00      
   Some Help            01/01/70 00:00      
      A Little More Help            01/01/70 00:00      
         The danger of cut and paste            01/01/70 00:00      
            Homework            01/01/70 00:00      
   A routine I used            01/01/70 00:00      
      STXD            01/01/70 00:00      
      Thanks            01/01/70 00:00      
         ways to skin the cat            01/01/70 00:00      
            AND            01/01/70 00:00      
               that's why FAQs are...            01/01/70 00:00      
               Might be OK            01/01/70 00:00      
                  you are, of course, right, but he still should kno            01/01/70 00:00      
                     no worse than scanning keyboard, etc.            01/01/70 00:00      
                        Oh yeah            01/01/70 00:00      
                           Most of \'em did it without a timer or an int ...            01/01/70 00:00      
                              I did not know            01/01/70 00:00      
                                 There wasn't any '51 back then, but ...            01/01/70 00:00      
                                    I do remember the 10 CPS            01/01/70 00:00      
                                       The TTY was the rate-determining step            01/01/70 00:00      
                           re: Oh, yeah            01/01/70 00:00      
   get it here!            01/01/70 00:00      
      Oh no, not again!            01/01/70 00:00      
         he is just promoting his \"website\"            01/01/70 00:00      
            visit my site            01/01/70 00:00      
               well!            01/01/70 00:00      
                  OK, so where's the soft UART on your site?            01/01/70 00:00      
                     code            01/01/70 00:00      
                        I can't find it....            01/01/70 00:00      
                  SO why the registration, then?            01/01/70 00:00      
                     hmm.. nice question.            01/01/70 00:00      
                        state it so            01/01/70 00:00      
                           policy?            01/01/70 00:00      
                              what "fame:"            01/01/70 00:00      
                              contrary            01/01/70 00:00      
                                 leave it!            01/01/70 00:00      
                                    NOnonono! please...            01/01/70 00:00      
                                       I think he is confused ...            01/01/70 00:00      
                                          "Danish"            01/01/70 00:00      
                                             so it's ultimately Austrian?            01/01/70 00:00      
                                                in a way            01/01/70 00:00      
                                                   not as good a good product here ... ...            01/01/70 00:00      
                                    fit?            01/01/70 00:00      
                                       clear            01/01/70 00:00      
                                          clear is clear            01/01/70 00:00      
                                             agree with jan!            01/01/70 00:00      
                                                that's why I recommend you to put comments            01/01/70 00:00      
                                                   thank you!            01/01/70 00:00      
                                          Oh            01/01/70 00:00      
                                             Read it!            01/01/70 00:00      
                                                the thing            01/01/70 00:00      
   the code:            01/01/70 00:00      
      nice, but compiler dependent...            01/01/70 00:00      

Back to Subject List