Witam wszystkich. Mam problem z nastawieniem alarmu w pcf8583...próbowa³em ju¿ ró¿nych kombinacji i ci±gle nic. Muszê zrobiæ budzenie procka przerwaniem int generowanym przez ow± ko¶æ. Pewnie robiê co¶ nie tak...proszê bardzo o kawa³ek kodu (najlepiej w bascomie) nastawiaj±cego alarm. ps. ko¶æ jest sprawna - datê i godzinê ustawiam i czytam.
pcf8583 i alarm
Jul 12, 2005
4 Replies
U¿ytkownik "Rafa³" snipped-for-privacy@o2.pl napisa³ w wiadomo¶ci news:db13rb$248a$ snipped-for-privacy@news.enterpol.pl...
ja kiedy¶ próbowa³em, ale mi siê nie uda³o. Kto¶ ju¿ kiedy¶ poza tym o to pyta³. Mo¿e to jest proste, ale ja nie wiem jak to zrobiæ, a wydawa³o mi siê, ¿e robie wzystko dobrze. pozdrawiam
w³a¶nie :)...wszêdzie pe³no przyk³adów ale tylko dotycz±cych zegara...o alarmie jest tylko teoria
U¿ytkownik "Rafa³" snipped-for-privacy@o2.pl napisa³ w wiadomo¶ci news:db13rb$248a$ snipped-for-privacy@news.enterpol.pl...
A mozesz napisac co pokolei robisz aby ustawic alarm ??? Czytales note ??
U¿ytkownik "Rafa³" snipped-for-privacy@o2.pl napisa³ w wiadomo¶ci news:db13rb$248a$ snipped-for-privacy@news.enterpol.pl...
Tu masz przyklad jak wyglada procedura ustawienia alarmu:
- Alarm Lets take the example to set an alarm such that always 15 minutes past the hour the alarm flag AF is set and an interrupt is generated.
Binary Hex, addr, comments
generate I2C-bus start condition
1 0 1 0 0 0 1 W A2 -- slave address 0 0 0 0 1 0 0 1 09 word address 9 for minute alarm. 0 0 0 1 0 1 0 1 15 09 Minute alarm enabled and set for 15 minutes 1 0 0 0 0 0 0 0 80 0A hour alarm is disabled 1 0 0 0 0 0 0 0 80 0B day alarm is disabled 1 0 0 0 0 0 0 0 80 0C weekday alarm is disabledgenerate I2C-bus start condition
1 0 1 0 0 0 1 W A2 slave address 0 0 0 0 0 0 0 1 01 word address 1,next bytes are data 0 0 0 0 0 0 1 0 02 01 control/status2, clear alarm flag and enable alarm interruptgenerate I2C-bus stop condition Remark: The interrupt is only set at the counter transition from 14 to 15.
Join the Discussion
Have something to add? Share your thoughts — no account required.
Didn't find your answer?
Ask the community — no account required