I succeeded in creating a two part pattern loop. An issue was that blanking the image in between each shift caused the LED to be less bright. By adding a delay the impact of the blank could be reduced, however, initially there was too much delay and the pattern seemed to be blinking. The correct code is as follows:
PatternDelay
call Blank
movf p1,w
movwf PORTC
movf p1+1,w
movwf PORTB
call SmallDelay
call Blank
movf p2,w
movwf PORTC
movf p2+1,w
movwf PORTB
call SmallDelay
decfsz delay+1,f
goto PatternDelay
decfsz howlong,f
goto PatternDelay
retlw 0
Here the two patterns are in p1 and p2. As you can see it is relatively easy to extend to more patterns. The next step would be to write an application that can find the minimum sets needed to display a certain pattern.
Geen opmerkingen:
Een reactie posten