;******************************************************* ;* Code Produced by the * ;* PROTON+ Compiler. Version 2.1.3 * ;* Copyright Rosetta Technologies/Crownhill Associates * ;* Written by Les Johnson. 2003 * ; 18F242 ;******************************************************* Device 18F242 xtal 20 @CONFIG_REQ @__CONFIG CONFIG1H, OSCS_OFF_1 & HS_OSC_1 @__CONFIG CONFIG2L, BOR_ON_2 & BORV_20_2 & PWRT_ON_2 @__CONFIG CONFIG2H, WDT_OFF_2 & WDTPS_128_2 @__CONFIG CONFIG4L, STVR_ON_4 & LVP_OFF_4 & DEBUG_OFF_4 symbol CLOK portc.0 symbol ANUL portc.1 symbol AEEN portc.2 symbol ATWEE portc.3 symbol UDAT portc.4 symbol LDAT portc.5 symbol STROB portc.6 symbol ENEBL portc.7 dim iRow as byte ALL_DIGITAL true ;Alle ingangen digitaal clear delayms 500 HOOFD: high Enebl ; alles uit iRow = 0 call set_row shout Udat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 1 call set_row shout Udat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 2 call set_row shout Udat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 3 call set_row shout Udat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 4 call set_row shout Udat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 5 call set_row shout Udat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 6 call set_row shout Udat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 7 call set_row shout Udat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 0 call set_row shout Ldat ,clok ,msbfirst, [%00010101, %01000101, %01010001, %01010100] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 1 call set_row shout Ldat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 2 call set_row shout ldat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 3 call set_row shout ldat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 4 call set_row shout ldat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 5 call set_row shout ldat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 6 call set_row shout ldat ,clok ,msbfirst, [%00101010, %10001010, %10100010, %10101000] ; rij 0 pulsout strob,1 delayus 5 low enebl delayus 5 high Enebl ; alles uit iRow = 7 call set_row shout ldat ,clok ,msbfirst, [%01010101, %10101010, %01000101, %10001000] ; rij 1 pulsout strob,1 delayus 5 low enebl delayus 5 Goto HOOFD doe: return set_row: if iRow.0 = 0 then low anul else high anul endif if iRow.1 = 0 then low aeen else high aeen endif if iRow.2 = 0 then low atwee else high atwee endif return End