please dont rip this site

Mike Harrison says:

While we're on the subject of neat little routines etc...

This code sends a byte at 115.2Kbaud
With a 4.096MHZ xtal, error is about 1.25% (near enough),
with 4.000MHz, 4.55% (marginal).

Data is non-inverted (i.e can be fed straight to PC)

txbyte  
  movwf temp
  movlw d'10'  ; 1 start + 8 data + 1 stop
  movwf cnt
  bcf status,c  ;start bit
  movf portb,w
txloop
  andlw 0ff-(1<<seroutbit)
  skpc
  iorlw 1<<seroutbit
  movwf portb
  sec
  rrf temp ; carry shifted in as stop bit
  decfsz cnt
  goto txloop
  return

Incidentally It's also possible to do 115K2 bit-bashed reception at 4.096MHz, by generating an INT interrupt off the startbit edge, and grabbbing all the data bits within the int code. Context save/restore overheads mean there's only a couple of cycles available to the foreground task if data is streaming in continuously!


file: /techref/microchip/rs232at115kbps.htm, 1KB, , updated: 2000/3/20 10:02, local time: 2008/11/22 02:16,
TOP NEW HELP FIND: 
38.103.63.59:LOG IN
©2008 PLEASE DON'T RIP! DO: LINK / DIGG! / MAKE!

 ©2008 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it!
<A HREF="http://piclist.org/techref/microchip/rs232at115kbps.htm"> Mike Harrisons 115.2kBaud with a 4.096Mhz crystal</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be reviewed) Just type in the box and press the Post button. (HTML welcomed!): A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Did you find what you needed?

  PICList 2008 contributors:
o List host: MIT, Site host massmind.org, Top posters @20081122 Apptech, Jinx, Xiaofan Chen, olin piclist, Vitaliy, William \Chops\ Westfield, Tamas Rudnai, JonnyMac, Alan B. Pearce, Gerhard Fiedler,
* Page Editors: James Newton, David Cary, and YOU!
* Roman Black of Black Robotics donates from sales of Linistep stepper controller kits.
* Ashley Roll of Digital Nemesis donates from sales of RCL-1 RS232 to TTL converters.
* Monthly Subscribers: Shultz Electronics, Timothy Weber, on-going support is MOST appreciated!
* Contributors: Richard Seriani, Sr.
  'What can I do?' - SiCKO

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .