Hi all,
I’ve been playing with the Olimex P20 boards for a while now, and thought I’d better get some serial comms happening. Thinking this would be a breeze I wrote some code using AVR GCC. Unfortunately comms didn’t happen at all, so I wrote some code using Bascom AVR - still no comms. I then tried Codevision - nada.
I went back to Bascom and wrote a simple program (below), removed the ATtiny2313 from the P20 board, and put it in an older Dontronics DT006 board. Serial comms now works!
Now, I must say that I’ve ‘lost’ 2 ATtiny2313’s possibly due to my mis-interpretation of the fuse bits, thus I haven’t changed them on my (second last) chip, so this may be a timing issue.
To cut to the chase, my question is… Has anyone had problems with P20 board comms at all?
Cheers, Phil.
Bascom Code…
$regfile = “attiny2313.dat”
$crystal = 4000000 '8000000
$baud = 9600
Config Portb = Output
Dim I As Integer
Portb.7 = 1
Waitms 10
For I = 1 To 10
Portb.7 = 0
Waitms 10
Portb.7 = 1
Waitms 10
Next I
I = 0
Do
Portb.7 = 0
Waitms 1
Portb.7 = 1
Incr I
Print "Test " ; I
Waitms 1000
Loop