Avatar billede herbert Nybegynder
02. september 2001 - 15:34 Der er 1 løsning

serielt halløj i vb

Kan nogen hjælpe mig med at implementere følgende i et vb prg? Jeg har en ocx skrevet C++ som gør følgende men den er skod..


Serial settings

The settings of the serial port must be 9600 Baud, no parity, 1 stop bit and no flow-control.

Initialization

The device is powered up by setting RTS and DTR high on the host.
After a few milliseconds the microcontroller is up and running.
During powerup the output pins of the microcontroller are not yet stable.
This gives some garbage on the RXD line of the host.
So clear the input fifo on the host, a few milliseconds after setting RTS and DTR high.
Next the host must send a character \'I\' and a character \'R\' with at least a 500 microsecond delay in between.
The microntroller responds with sending the characters \'O\' and \'K\'.
Now the initialization is done and the microcontroller will start sending decoded infrared-trains to the host from this point on.


Receiving Remote Keypresses

Once the device is initialized, the microcontroller sends 6 bytes to the host,
every time a decodable infrared pulsetrain comes in from the infrared receiver.
These 6 bytes are pseudorandom, but constant for every specific key on a remote.
If more information is needed, please let me know.

Avatar billede herbert Nybegynder
02. september 2001 - 15:58 #1
hár selv fundet en løsning.
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester