Một số các hướng dẫn sau sẽ yêu cầu hai hội đồng xử lý, đây là lý do cho kết nối thứ hai trên PORTB - hai bộ xử lý này sẽ giao tiếp với nhau trên một chiếc xe buýt nối tiếp tiêu chuẩn 9600 baud, hội đồng quản trị thứ hai có thể được hỗ trợ từ (đầu tiên sử dụng kết nối bốn dây dẫn), hoặc hỗ trợ từ cung cấp riêng của nó (bằng cách sử dụng một kết nối dây dẫn ba). | A bottom view of the Switch Board the seven track cuts are marked with blue circles and it has seven wire links on the top. PIC Tutorial One - LED s PIC Tutorial - LED Board LED Board This is the LED Board a simple array of eight LED s connected to all pins of one port. As well as being used for simple output tutorials it can be used as a debugging aid by using it to display values at certain points in a program. Although it s labelled as connecting to PortB it can also be connected to PortA if required. This is the top side of the LED board it s built on a piece of Veroboard 15 strips wide by 24 holes high it consists simply of eight LED s eight resistors and the connector. This board has only one wire link across the top side of the connector to connect the ground connection of the LED s. The bottom of the board it has only seven track cuts again they are marked with blue circles. For the first parts of this tutorial you can use the Main Board LED with jumper J1 set or you can use the LED board on PortB the later parts use more than one LED and the LED board will be required. Download zipped tutorial files. Tutorial This simple program repeatedly switches all the output pins high and low. Tutorial - Nigel Goodwin 2002 LIST p 16F628 g 0x3D18 tell assembler what chip we are using include the defaults for the chip include conf i sets osc the configuration illator type etc. settings org 0x0000 org sets the origin 0x0000 for the 16F628 this is where the program starts running movlw 0x07 movwf CMC ON turn comparators off make it like a 16F84 bsf STATUS RP0 sele ct bank 1 movlw b 00000000 set PortB all outputs movwf TRISB movwf TRISA set PortA all outputs bcf STATUS RP0 sele ct bank 0 Loop movlw 0xff movwf PORTA movwf PORTB nop the goto nop movlw 0x00 movwf PORTA movwf PORTB goto Loop end set all bits on the nop s make up the time taken by giving a square wave output set all bits off go back and do it again The first three lines are instructions to .