SHARP PC-G850V(S) User Manual -
Appendix A: 11-Pin Interface
21
In order to test the complete PIC programming process with the PC-G850V(S), the
following, quite simple PIC-program can be used. It flashes an LED that is connected to
the RB1-pin:
10 #include "p16f84a.inc"
20 __config 0x3ff1 ;CP_OFF & PWRT_ON & WDT_OFF & XT_OSC
30DELAY1 equ 0x08 ;delay counter 1
40DELAY2 equ 0x09 ;delay counter 2
50 org 0
99
100start
110 bsf STATUS,RP0 ;change to bank 1
120 bcf TRISB,1 ;enable RB1 for output
130 bcf STATUS,RP0 ;back to bank 0
140loop
150 bsf PORTB,1 ;RB1=1,LED=on
160 call delay
170 bcf PORTB,1 ;RB1=0,LED=off
180 call delay
190 goto loop
299
300delay
310 movlw 255
320 movwf DELAY1
330 movwf DELAY2
340dloop
350 decfsz DELAY1,f
360 goto dloop
370 decfsz DELAY2,f
380 goto dloop
390 return
Enter this source code in TEXT-mode and compile it with the PIC-assembler. Now
connect a PIC16F84A with the PIC-burner circuit from above (or equivalent) to the 11-pin
interface of the PC-G850V(S). Finally activate the PIC-loader from the PIC-assembler
sub-menue.