Closed GoogleCodeExporter closed 9 years ago
1-wire means SPI, correct?
PORT3 must be a definition in C. It should evaluate to 3, which would be port D
With the ATMEGA there was an issue with the chip select line. In principle it
is hard to use the CS for something else.
At least for testing, i also suggest to use SW SPI for a while. It will treat
the pins as normal IO pins without problems regarding the CS line.
Original comment by olikr...@gmail.com
on 16 Oct 2013 at 5:12
See ATmega328P datasheet, rev. D, page 171 (SS Pin Functionality). In short:
The SS pin can set the AVR's hardware SPI to slave mode IF it's configured as
an input AND pulled low by an external device or the AVR itself. Your 1-Wire
device will do that when you communicate with it. So you cannot use 1-wire and
hardware SPI at the same time (!).
What you can do is: Use the hardware SPI to communicate with the display, do
1-wire stuff (that will set the hardware SPI to slave mode), set the SPI to
master mode again. Then you can talk to the display again. If you have the SPI
interrupt enabled, things will get a bit more complicated.
Using the SS pin for 1-wire was a very unfortunate choice!
Original comment by avrbegin...@googlemail.com
on 16 Oct 2013 at 6:44
@ Oli:
No, 1-Wire is a proprietary protocol from Dallas Semi. You need just one pin
for the whole communication and sometimes its also for power, too.
So I tought I just map the CS for OLED to any IO of my AVR and the 1-Wire
pin... Software-SPI is my next try.
@ AVRbeginer:
Thanks for explanation! Now it seems reasonable that the communication stops
after the presence signal. So it has nothing to do with this lib - its just my
stupid fault.
I will try SW-SPI, if this is too slow (need at least 5 FPS), I will try
avrbeginner's idea or really need to change the HW, what a fun with TQFP :D
Thanks you both a lot!
Original comment by bad...@gmail.com
on 16 Oct 2013 at 7:35
Original issue reported on code.google.com by
bad...@gmail.com
on 16 Oct 2013 at 4:01