0 favorites     0 comments    473 visits

1/13 f/3.5 10.2 mm ISO 200

PENTAX Corporation PENTAX Optio S5z

EXIF - See more details

See also...


Keywords

LED
RGB
SPI
AVR
USI
ATtiny
MBI5168


Authorizations, license

Visible by: Everyone
All rights reserved

473 visits


ATtiny2313 - USI SPI master

ATtiny2313 - USI SPI master
Well it works, but I had teething problems. Running an ATmega168 as SPI master was much easier.

The datasheet has two USI SPI master examples (assembler), only one works for me, after translating that to C. The first example loops until the USIOIF flag is set. The 2nd example just toggles the clock line and shifts the data - at least that is what it should do. I couldn't get that to work. And I'm not talking about simple bit-banging, but still using the USI module, but telling it when to toggle the clock line and when to shift the data in USIDR etc.

I also need to investigate further about the clock sources for the USI module/counters. I got confused about them.

And the worst thing: My old Textronix 314 scope lost one of its pushbuttons today. I need to fix that either with glue or sugru. Unfortunately its one of the channel select buttons. Heavy usage.

Comments

Sign-in to write a comment.