Loading ...
Sorry, an error occurred while loading the content.

[acex-users] putc

Expand Messages
  • Fredric White
    I ll start things off with an RS232 put character routine, considerably more compact that the example on Fairchild s website. Delays are for 57600bps (and must
    Message 1 of 1 , Oct 16, 1999
    View Source
    • 0 Attachment
      I'll start things off with an RS232 put character routine,
      considerably more compact that the example on Fairchild's website.
      Delays are for 57600bps (and must be tuned for your precise clock
      freq, of course).

      Fredric

      ;; putc -- put char in A to serial port.
      putc rbit TXD,PORTGD ; 2,2 START bit
      jsr dly14 ; 3,5 delay(14)
      sc ; 1,1
      pc1 rrc A ; 1,1 Next bit into carry
      stc TXD,PORTGD ; 2,2 Copy to output bit
      jsr dly11 ; 3,5 Delay(11)
      rc ; 1,1
      ifne A,#01 ; 2,2
      jp pc1 ; 1,1
      sbit TXD,PORTGD ; 2,2 STOP bit

      ;; fall thru

      ;; dlyNN -- delay NN cycles (approx usec)
      dly14 nop
      dly13 nop
      dly12 nop
      dly11 nop
      dly10 ret
    Your message has been successfully submitted and would be delivered to recipients shortly.