Atmel AVR Microcontroller discussion group.
Valentines day is coming.... AT90S2313 Valentine.....kinda... - Walter - Jan 3 2:20:00 2003
I have seen many "pendulum" clocks based on pic or atmel chips... I
have always thought they were cool....So created a small sign based
on them.....
I use portb as output....to 330 ohm resisters to bright LED to gnd.
I only use 7 of the 8 but you could use 8 outs if you wanted.... I
put a 4mhz resonator on pin 4 and 5 with middle pin to gnd. Pin 20
to Vcc and pin 20 to gnd.
I use the following program... my wife's name is Julie... I have not
perfected the timing... but when I swing the little board around with
the led's... you can clearly make out "I love you Julie" all in upper
case....
Great for kids to.... put their names or secret messages ...
Cheers folks I hope this isn't to basic for you guys...
Config Portb = Output
Loop:
Dim A As Integer , B1 As Byte , Count As Byte
Dim S As String * 15
Dim L As Long
Restore Dta1 'point to
stored data
For Count = 1 To 119 'for
number of data items
Read B1 : Portb = B1
Waitms 1
Next
Goto Loop
End
Dta1:
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00 '
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H78 , &H06 , &H01 , &H06 , &H78 , &H00 , &H00 'v
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H40 , &H20 , &H1F , &H20 , &H40 , &H00 , &H00 'y
Data &H3F , &H41 , &H41 , &H41 , &H3F , &H00 , &H00 'o
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00
Data &H00 , &H02 , &H01 , &H01 , &H7E , &H00 , &H00 'J
Data &H3E , &H01 , &H01 , &H01 , &H3E , &H00 , &H00 'u
Data &H7F , &H01 , &H01 , &H01 , &H01 , &H00 , &H00 'l
Data &H00 , &H00 , &H7F , &H00 , &H00 , &H00 , &H00 'i
Data &H7F , &H49 , &H49 , &H41 , &H00 , &H00 , &H00 'e
Data &H00 , &H00 , &H00 , &H00 , &H00 , &H00 , &H00

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: Valentines day is coming.... AT90S2313 Valentine.....kinda... - Patrick Timlin - Jan 3 15:25:00 2003
Hi everyone,
Just joined the group and am still learning about the AVR line and
use BASCOM-AVR as my programming language of choice. Maybe later I
will try to pick up some assembly, just in case. Anyway...
--- Walter wrote:
> I have seen many "pendulum" clocks based on pic or atmel chips... I
> have always thought they were cool....So created a small sign based
> on them.....
>
> I use the following program...
>
> Config Portb = Output
> Loop:
> Dim A As Integer , B1 As Byte , Count As Byte
> Dim S As String * 15
> Dim L As Long
> Restore Dta1 'point to stored data
[snip... etc.]
Cool, I will have to give that a try and see how it works out for me.
Just a note on your code, but wouldn't it make more sense to move
your LOOP: tag below your DIM statements. You only need to DIM your
variables once right? Of course maybe the compiler ignore the repeat
of the DIM statements, but for nicer code, you might move the LOOP:
statement down 3 lines.
Patrick

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )
Re: Valentines day is coming.... AT90S2313 Valentine.....kinda... - Walter - Jan 16 12:01:00 2003
Thanks for your feedback.... I moved the loop further down and it
worked fine.... I actually added some more code and bi-coloured LED's
so I have two messages, one red and one green and it switches back
and forth between them... very cool but my arm is getting tired from
waving the unit back and forth.....will have to put this thing on a
fan blade.... he he... cheers and thanks again....
--- In avrclub@avrc..., "Patrick Timlin <ptimlin@y...>"
<ptimlin@y...> wrote:
> Hi everyone,
>
> Just joined the group and am still learning about the AVR line and
> use BASCOM-AVR as my programming language of choice. Maybe later I
> will try to pick up some assembly, just in case. Anyway...
>
> --- Walter wrote:
> > I have seen many "pendulum" clocks based on pic or atmel chips...
I
> > have always thought they were cool....So created a small sign
based
> > on them.....
> >
> > I use the following program...
> >
> > Config Portb = Output
> > Loop:
> > Dim A As Integer , B1 As Byte , Count As Byte
> > Dim S As String * 15
> > Dim L As Long
> > Restore Dta1 'point to stored data
> [snip... etc.]
> Cool, I will have to give that a try and see how it works out for
me.
> Just a note on your code, but wouldn't it make more sense to move
> your LOOP: tag below your DIM statements. You only need to DIM your
> variables once right? Of course maybe the compiler ignore the
repeat
> of the DIM statements, but for nicer code, you might move the LOOP:
> statement down 3 lines.
>
> Patrick

(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )