AVR virtualis(SW) UART
hwsw famulus
hwsw at famulus.hu
Mon Apr 5 11:43:43 CEST 2004
OPEN utasitas...
KJ
--------------------
The default device is COM1 and you don't need to open a channel to use INPUT/OUTPUT on this device.
With the implementation of the software UART, the compiler must know to which pin/device you will send/receive the data.
So that is why the OPEN statement must be used. It tells the compiler about the pin you use for the serial input or output and the baud rate you want to use.
COMB.0:9600,8,N,2 will use PORT B.0 at 9600 baud with 2 stopbits.
The format for COM1 and COM2 is : COM1: or COM2:
There is no speed/baud rate parameter since the default baud rate will be used that is specified with $BAUD or $BAUD1
The format for the software UART is: COMpin:speed,8,N,stopbits[,INVERTED]
Where pin is the name of the PORT-pin.
Speed must be specified and stop bits can be 1 or 2.
7 bit data or 8 bit data may be used.
For parity N, O or E can be used.
An optional parameter ,INVERTED can be specified to use inverted RS-232.
Open "COMD.1:9600,8,N,1,INVERTED" For Output As #1 , will use pin PORTD.1 for output with 9600 baud, 1 stop bit and with inverted RS-232.
-------------------
> NINCS! messze ohajod fjucsor.
> a BASCOM tud asszem max. 7 sw UART-t helybol.
> Lasd help/doksi
>
> KJ
>
>
>
> Felmerult, hogy ATMega16-ban kellene 2 UART, es valamifele swmegvalositas lenne a legjobb. Keresgeltem mintaprogramokat, mind a megvalositasra, mind a hasznalatasara. Mondezt BASCOM alatt lenne a legjobb. A berendezes egy mobiltelefon es egy PC kozott lenne (a PC terminalkent mukodik, a telefon meg tarcsazo/sms kuldo/fogadokent).
>
> Nagyon messze van az elkepzelesem a valosagtol?
>
> Robi
>
>
>
>
>
More information about the Elektro
mailing list