PDA

View Full Version : one line led light make image



bioul
- 11th February 2008, 13:50
Hi!

I'm using PIC BASIC with a PIC18F452. I'm wondering whether there's anyone who could tell me how it work or sample code that when one line- 8 led light is shaking, it makes a image or text,,,,thanks, bioul

Pic_User
- 11th February 2008, 16:46
Hi!

I'm using PIC BASIC with a PIC18F452. I'm wondering whether there's anyone who could tell me how it work or sample code that when one line- 8 led light is shaking, it makes a image or text,,,,thanks, bioul

Hi bioul,
Welcome to the forum.

Do you mean “afterimage phenomenon”
Like this:http://www.luberth.com/analog.htm

-Adam-

bioul
- 12th February 2008, 10:26
hellow

yes, but usually they are using other program as like Qbasic so that I can't understand the method very clearally. Because right now I'm using and studying Pic basic pro. It will be very helpful for me if anyone has sample code(pic basic pro) .

anyway, ^^
thanks Adam for your good information that will be very helpful for me..

Acetronics2
- 12th February 2008, 10:47
Hi, Bioul

When it was "Ze Gadget à la mode" ... I saw lots of designs on the Web.

Try the "Propeller clock" keyword for search ...

got 5+ PAGES of valid and relevant links ... at first shot.

Alain

xobx
- 12th February 2008, 14:05
This is NOT my code.



DEFINE OSC 20

p_01 var PORTD.4
p_02 var PORTD.5
p_03 var PORTD.6
p_04 var PORTD.7
p_05 var PORTB.0
p_06 var PORTB.1
p_07 var PORTB.2
p_08 var PORTB.3
p_09 var PORTB.4
p_10 var PORTB.5
p_11 var PORTB.6
p_12 var PORTB.7

RW var bit[12]
x var word
POS var word

DATA 1

DATA 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
DATA 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1
DATA 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1
DATA 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
DATA 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1
DATA 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1
DATA 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1
DATA 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0
DATA 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
DATA 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1
DATA 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1
DATA 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0
DATA 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0
DATA 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1
DATA 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1
DATA 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1
DATA 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1
DATA 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1
DATA 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1
DATA 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1

TRISB = 0
TRISA = 1
TRISD = 0
ADCON1= %00000111

PORTB = 0
PORTD = 0

LOOP:

if PORTA.0 = 0 then

For POS = 0 TO 228 step 12

for x = 1 to 12
READ POS+x,RW[x]
next x

p_01=RW[1]: p_02=RW[2]: p_03=RW[3]: p_04=RW[4] : p_05=RW[5] : p_06=RW[6]
p_07=RW[7]: p_08=RW[8]: p_09=RW[9]: p_10=RW[10]: p_11=RW[11]: p_12=RW[12]

PAUSEUS 1000

NEXT POS

PORTB = %00000000
PORTD = %00000000

endif

goto LOOP

Pic_User
- 12th February 2008, 15:50
I wonder what that spells or shows??? Better try it before showing it in public! lol

xobx
- 12th February 2008, 23:46
It makes a heart :P

If you look a the "DATA lines" you can see a lying heart..

bioul
- 13th February 2008, 12:19
Wow
I will try and study and later on I will make own my code

Thank you very very much ^^