Hi i am new too :) But i can help u a little...
'for buttons
loop:
if portb.0=0 then goto b1
if portb.1=0 then goto b2
if portb.2=0 then goto b3
if portb.3=0 then goto b4
if portb.4=0 then goto b5
if portb.5=0 then goto b6
if portb.6=0 then goto b7
if portb.7=0 then goto b8
goto loop
'for actions
b1:
high portd.0
gosub bekle
goto loop
b2:
high portd.1
gosub bekle
goto loop
b3:
high portd.2
gosub bekle
goto loop
b4:
high portd.3
gosub bekle
goto loop
b5:
high portd.4
gosub bekle
goto loop
b6:
high portd.5
gosub bekle
goto loop
b7:
high portd.6
gosub bekle
goto loop
b8:
high portd.7
gosub bekle
goto loop
bekle:
pause 1000
RETURN
end
Qbasic to PBP on pic16F876 check my code
i'm trying to get Qbasic and the 16F876 pic to Talk
VIA RS232 and the Max232 chip
if i start the pic first -nothing happens
if i start QB first then pic i get "Device I/O error" message
.5 sec after pic is started
qbasic may work at 19200 baud which i would like
and i think i would need faster that
4mhz crystal for the pic also
---------------------------------
PBP code here-
---------
DEFINE LOADER_USED 1 'for melabs bootloader
DEFINE OSC 4 'for 20mhz pic
DEFINE HSER_RCSTA 90h 'set port to input
DEFINE HSER_TXSTA 20h 'set port to output
DEFINE HSER_BAUD 9600 'set baud rate
B0 VAR BYTE
B1 VAR BYTE
B1 = 44
B0 = 0
Hseer: HSerout [B1]
HSerin [B0]
IF B0 > 0 Then loop 'go to loop and blink led if value found
GoTo hseer
loop: High 0 'Turn on LED connected to RB0
Pause 50 'Delay for .5 seconds
Low 0 'Turn off LED connected to RB0
Pause 50 'Delay for .5 seconds
GoTo loop 'Go back to loop and blink LED forever
End
-------------------------end PBP code
Qbasic-code below
-----------------
10 CLS
' Open communications (2400 baud, no parity, 8-bit data,
' 1 stop bit,
OPEN "COM1:9600,N,8,1,CD0,CS0,DS0,OP0" FOR RANDOM AS #1
20 INPUT #1, B$
PRINT B$
30 GOTO 20
END
-----------------
Qbasic Loop test works fine
---- looptest.bas
10 CLS
' Open communications (9600 baud, no parity,
' 8-bit data,1 stop bit,
OPEN "COM1:9600,N,8,1,CD0,CS0,DS0,OP0" FOR RANDOM AS #1
20 A$ = "Hello"
Print #1, A$
INPUT #1, B$
PRINT B$
30 GOTO 30 'holds screen
END
Help with subscribe picbasic list
the pic basic list
has been around for long time
they have lots of knowledge
but when send email
Subscribe picbasic-l
i get no responce
please help