Drake is the name of the computer I am developing. However, this blog covers all aspects of embedded hardware and software, and explains various projects in detail. Feedback is greatly appreciated.
zondag 26 april 2009
Source code for LED cube control
The source code for the LED cube control is now available. Basically PORTB and PORTC of the PIC16F57 (which is actually a low end device) are used to control the output. I'm looping one bit through PORTB and one bit through PORTC to address all LED.
Fourth layer picture
zaterdag 25 april 2009
Fourth layer
The fourth layer is finished, but not attached yet. Hopefully that will happen tomorrow, together with my first animation. Video should be provided.
zondag 12 april 2009
Third layer
maandag 30 maart 2009
Pattern
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.
zondag 29 maart 2009
Figures
Today I tried to create the first figure on the LED cube, an O. In order to do this I had to switch between two patterns, two dots at the bottom in the middle and at the top in the middle, and two dots to the left in the middle and at the right in the middle. The trick was ensuring that the screen is blank in between, because any transistion LED will seem lit as well. The code became:
Next step would be to have the delay loop automatically switch between two patterns... Although I might need more than two for complex figures. At 20 MHz it is completely invisible that such switching is taking place, except for the LED being slightly dimmer. Biggest problem is still that the bottom LED make it seem like the LED at the top are slightly lit. I might need to reduce their transparancy somehow.
Display
call Blank
movlw 96
movwf PORTC
movlw 6+96
movwf PORTB
call Blank
movlw 144
movwf PORTC
movlw 9+144
movwf PORTB
goto Display
Blank
movlw 240
movwf PORTC
clrf PORTB
retlw 0
Next step would be to have the delay loop automatically switch between two patterns... Although I might need more than two for complex figures. At 20 MHz it is completely invisible that such switching is taking place, except for the LED being slightly dimmer. Biggest problem is still that the bottom LED make it seem like the LED at the top are slightly lit. I might need to reduce their transparancy somehow.
Abonneren op:
Posts (Atom)