derrick826
New Member
hi again guys,
I'm facing another problem regarding on the Transmission of datas from my PIC to PC via the serial cable. Currently I'm using the RS232 model circuit taken accordingly from Nigel_goodwin's tutorial, a serial cable to connect to the PC (male to female converter) and of course the PIC to trasmit the data. I'm sending the data through RC6/tX. And my coding goes like this:
__config _CP_OFF & _PWRTE_ON & _XT_OSC & _WDT_OFF
ERRORLEVEL -302 ;Suppress bank warning
org 0x000
goto start
int org 0x004
goto int
start
CALL INITIAL
START1
CALL SEND
CALL CHECK
GOTO START1
SEND
MOVLW B'10010000'
MOVWF TXREG
RETURN
INITIAL
BCF STATUS,RP1
BSF STATUS,RP0
MOVLW B'00000000'
MOVWF TRISB
MOVLW h'24'
MOVWF TXSTA
MOVLW D'129'
MOVWF SPBRG
movlw B'10000000'
movwf TRISC
BCF STATUS,RP0
BSF RCSTA, SPEN
RETURN
CHECK
MOVLW B'00010000'
MOVWF PORTB
ONEMORETIME
BTFSS PIR1,TXIF
GOTO ONEMORETIME
MOVLW B'10000000'
MOVWF PORTB
RETURN
END
i'm actually relooping so that i'm constantly sending b'10010000' (90 in hexa). Since the start bit starts at the LSB therefore the data that is transmitting will be
(startbit) 0 00001001 1 (stop bit)
Am i sending a data '09' in hexa?
i'm using a MATLAB program to receive these particular data and it doesn't seem to respond even though i send a data from my PIC. this particular data has gone through the rs232 for voltage conversion 12V and to the female serial cable which then goes into the male serial of the pc. When i measure the voltage out from the rs232.. it seems to be 20V.. not 12V.
I'm trying out one of Nigel's tutorial regarding on the rs232 thingy but I don't really know what program to use to check weather or not the data which is being trasmitted from my PIC is being display on the PC. Is there any specific program to display the results i sent?
hope you guys are able to give me some hint and help so that i know where to start. thanks in advance
I'm facing another problem regarding on the Transmission of datas from my PIC to PC via the serial cable. Currently I'm using the RS232 model circuit taken accordingly from Nigel_goodwin's tutorial, a serial cable to connect to the PC (male to female converter) and of course the PIC to trasmit the data. I'm sending the data through RC6/tX. And my coding goes like this:
__config _CP_OFF & _PWRTE_ON & _XT_OSC & _WDT_OFF
ERRORLEVEL -302 ;Suppress bank warning
org 0x000
goto start
int org 0x004
goto int
start
CALL INITIAL
START1
CALL SEND
CALL CHECK
GOTO START1
SEND
MOVLW B'10010000'
MOVWF TXREG
RETURN
INITIAL
BCF STATUS,RP1
BSF STATUS,RP0
MOVLW B'00000000'
MOVWF TRISB
MOVLW h'24'
MOVWF TXSTA
MOVLW D'129'
MOVWF SPBRG
movlw B'10000000'
movwf TRISC
BCF STATUS,RP0
BSF RCSTA, SPEN
RETURN
CHECK
MOVLW B'00010000'
MOVWF PORTB
ONEMORETIME
BTFSS PIR1,TXIF
GOTO ONEMORETIME
MOVLW B'10000000'
MOVWF PORTB
RETURN
END
i'm actually relooping so that i'm constantly sending b'10010000' (90 in hexa). Since the start bit starts at the LSB therefore the data that is transmitting will be
(startbit) 0 00001001 1 (stop bit)
Am i sending a data '09' in hexa?
i'm using a MATLAB program to receive these particular data and it doesn't seem to respond even though i send a data from my PIC. this particular data has gone through the rs232 for voltage conversion 12V and to the female serial cable which then goes into the male serial of the pc. When i measure the voltage out from the rs232.. it seems to be 20V.. not 12V.
I'm trying out one of Nigel's tutorial regarding on the rs232 thingy but I don't really know what program to use to check weather or not the data which is being trasmitted from my PIC is being display on the PC. Is there any specific program to display the results i sent?
hope you guys are able to give me some hint and help so that i know where to start. thanks in advance