AT91SAM7 jak hodit hodnoty na pin
Jiri Bezstarosti
jiri@bezstarosti.cz
Pondělí Duben 6 03:29:03 CEST 2009
Synchronous Data Output
Controlling all parallel busses using several PIOs requires two
successive write operations in the
PIO_SODR and PIO_CODR registers. This may lead to unexpected transient
values. The PIO
controller offers a direct control of PIO outputs by single write access
to PIO_ODSR (Output
Data Status Register). Only bits unmasked by PIO_OWSR (Output Write
Status Register) are
written. The mask bits in the PIO_OWSR are set by writing to PIO_OWER
(Output Write Enable
Register) and cleared by writing to PIO_OWDR (Output Write Disable
Register).
After reset, the synchronous data output is disabled on all the I/O
lines as PIO_OWSR resets at
0x0.
Tolik se pise v PDF ...
Uz to tady prakticky nectu, takze reaguji opravdu nahodou a pokud jak se
to ma zaznelo, omlouvam se, ale radeji to jeste zopaknu v lidstine a
cestine. Pokud nastavujete bity vystupu a potrebujete zmenit soucasne na
1 a 0 a jeste jen nektere bity, pak muzete zapsat do PIO_ODSR v pripade,
ze je konkretni bit nastaven v PIO_OWSR, coz se provede pres PIO_OWER a
pripadne smazne PIO_OWDR. Zkratka si hodite masku pres registr PIO_ODSR
a nastavujete si jen ty piny, ktere chcete a to do jednicek a nul
zaroven, co je vymaskovano se nezmeni, nema to povolen primy zapis.
Vypada to zamotane, ale kdyz s tim chvili delate, na ty tuny registru si
zvyknete a pak uz Vam to ani neprijde ;).
V kazdem pripade si vzdycky projdete PDF (dokumentaci), vyplati se to,
protoze tady obcas muzete dostat i pekne hrabeci rady :))).
--
Jiri Bezstarosti
Bear John Grills napsal(a):
> S tim nastavenim CODR pred nastavenim SODR jsem spokojen.. diky pomohlo
> mi to
>
Další informace o konferenci Hw-list