Category: PIC Dev Board V1

PIC Dev Board V1

My Velleman K8048 board didn’t always work. When I wanted to program a knightrider it failed again. Then I decided to throw it away and create a new development board that connects to my galvawisp. Today I etched and build this pcb. The microcontroller is a 16F628A, on port A there are 8 dipswitches and on port B there are 8 leds connected.

Circuit:

Schema PIC ontwikkelbordje

PCB:

pcb PIC ontwikkelbordje

The pcb layout pdf: Link.

Pictures:

foto PIC ontwikkelbordje

foto PIC ontwikkelbordje

Knightrider Code that I used for testing:

'****************************************************************
'*                      knightrider                             *
'****************************************************************
'Config
    Device 16F628A               
    Config INTRC_OSC_NOCLKOUT, WDT_OFF, PWRTE_ON, LVP_OFF, MCLRE_OFF
    ALL_DIGITAL TRUE                ;Alle ingangen digitaal
'****************************************************************
'Ingangen declareren
    Symbol switch   = PORTA
    Symbol sw1      = PORTA.7
    Symbol sw2      = PORTA.6
    Symbol sw3      = PORTA.5
    Symbol sw4      = PORTA.4
    Symbol sw5      = PORTA.3
    Symbol sw6      = PORTA.2
    Symbol sw7      = PORTA.1
    Symbol sw8      = PORTA.0
    'TrisA register instellen (alles ingang)
    TRISA           = 255 

'****************************************************************
'Uitgangen declareren
    Symbol ledjes   = PORTB
    Symbol led1     = PORTB.7
    Symbol led2     = PORTB.6
    Symbol led3     = PORTB.5
    Symbol led4     = PORTB.4
    Symbol led5     = PORTB.3
    Symbol led6     = PORTB.2
    Symbol led7     = PORTB.1
    Symbol led8     = PORTB.0
    'TrisB register instellen (alles uitgang)
    TRISB = 0                       

'****************************************************************    
'Decraraties voor programma:
    Symbol LedTijd  = 70 'doorschuif snelheid LED    
    Dim    index    As Byte
    ledjes          = %10000000 '1 led aanzetten
'****************************************************************
'Hoofdprogramma                                               
    While 1 = 1                     'Oneindige loop
        'Links schuiven
        For index = 0 To 6          'Uitvoren tot dat index 6 is
            ledjes = ledjes >> 1    'Ledjes naar rechts doorschuiven
            DelayMS LedTijd         'Wachten
        Next
        'Rechts schuiven
        For index = 0 To 6          'Uitvoren tot dat index 6 is
            ledjes = ledjes << 1    'Ledjes naar links doorschuiven
            DelayMS LedTijd         'Wachten
        Next       
    Wend

'****************************************************************
End

The hex file: link