Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature currently requires accessing the site using the built-in Safari browser.
Nacho dijo:Lo mas fácil es comprar el adaptador USB a RS-232, por economía y simplicidad.
Mira este enlace:
http://www.ramelectronics.net/html/usb_serial.htm
Utiliza el circuito integrado Prolific PL-2303 (USB to Serial Bridge Controller) que difícilmente lo consigues y fuera de eso tienes que programarlo.
Nacho dijo:Lo mas fácil es comprar el adaptador USB a RS-232, por economía y simplicidad.
Mira este enlace:
http://www.ramelectronics.net/html/usb_serial.htm
Utiliza el circuito integrado Prolific PL-2303 (USB to Serial Bridge Controller) que difícilmente lo consigues y fuera de eso tienes que programarlo.
#Include "windows.bi"
#Include "file.bi"
Dim Letra As String
Dim h As HANDLE
Dim ComX As Integer
Dim Puerto As String
Screen 9
Locate 10,1: Input "Escribe solo el -numero- del puerto COM donde tengas tu FTDI. COM:"; ComX
Cls
Locate 10,1
Print "Observa el cambio de estado de los LED. Ha de parpadear"
Print "primero uno y luego el otro, un segundo de tiempo cada uno."
Print
Print "Pulsa 'Escape' para salir. Igual tarda 2 segundos en tener efecto"
Print "hasta finalizar la temporizacion."
Puerto="Com"+Str(ComX)
Open Com Puerto+":9600, N, 8, 1, CS, DS, RS, CD" As #1
' El valor 9600 puede ser cualquier otro valor porque no estamos haciendo comunicaciones asincronas.
While Letra <> Chr(27)
Letra=InKey()
h = Cast(HANDLE, FileAttr( 1, fbFileAttrHandle ))
EscapeCommFunction( h, SETDTR ) ' DTR=1
Sleep 500
EscapeCommFunction( h, CLRDTR ) ' DTR=0
Sleep 500
EscapeCommFunction( h, SETRTS ) ' RTS=1
Sleep 500
EscapeCommFunction( h, CLRRTS ) ' RTS=0
Sleep 500
Wend
Close #1
End
#Include Once "windows.bi"
Dim Letra As String
Dim hCom As HANDLE
Dim modemStat As Dword
Dim ComX As Integer
Screen 9
Locate 10,1: Input "Escribe solo el -numero- del puerto COM donde tengas tu FTDI. COM:"; ComX
Cls
hCom = CreateFile( "Com" + Str(ComX), GENERIC_READ Or GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL )
While Letra = ""
Letra=InKey()
GetCommModemStatus( hCom, @modemStat )
Locate 10,10
If modemStat And MS_CTS_ON Then Print "CTS=1 "; Else Print "CTS=0 ";
If modemStat And MS_DSR_ON Then Print "DSR=1 "; Else Print "DSR=0 ";
If modemStat And MS_RING_ON Then Print "RING=1 "; Else Print "RING=0 ";
If modemStat And MS_RLSD_ON Then Print "RLSD=1" Else Print "RLSD=0"
Print modemstat
Wend
CloseHandle( hCom )
End