SEROUT
 
Syntax

void SEROUT (int pin,int baudrate, int posTrue,int cnt, char *outList );

Description


SEROUT sends cnt bytes pointed to by outList  out as asynchronous serial data on pin at a baudratePosTrue if set to 0 then the data is inverted.

outListis a character array.

These routines are "bit-banged" by the processor, so the processor is consumed during these operations.  Interupts are also disabled during each byte for these operations. 

Baudrates can be upto 115.2 Kbaud for all pins

UART0 support-

Use printf or TXD0. The hardware serial port routines are used, so the CPU is not tied up.  So when a byte is sent it is placed into the UART FIFO, but if the 16 byte FIFO is full then the CPU will wait until space is available.

For ARMexpress modules baudrates for RXD0 can be upto 19.2 Kbaud as it is limited by the level translators. No limit for ARMmite/ARMweb  Use setUART0baud() routine to set this baud.

Example

    shortMessage[0] = 0x33;
    shortMessage[1] = 0x34;
    shortMessage[2] = 0x35;
    
    SEROUT(3,19200, 1, 3, shortMessage);    // send 123 to the testjig serial connection

See also