RTC Challenge
Archiver
Posts: 46,084
Hi,
I have a Real Time Clock Challenge to BS2 programmers, the RTC is
TI's bq4847y, and the price is whichever of the three RTC of your
choice:
bq4847y
bq4850y
bq4822y
Datasheet available at http://www.ti.com.
Thanks.
I have a Real Time Clock Challenge to BS2 programmers, the RTC is
TI's bq4847y, and the price is whichever of the three RTC of your
choice:
bq4847y
bq4850y
bq4822y
Datasheet available at http://www.ti.com.
Thanks.
Comments
messed up. It mentions that the data you need is in Tables 1 and 2, but
there are no tables 1 and 2. This is a problem. A little more reading
shows that the device is functionally the same as a bq4845y -- that data
sheet is complete! There are few extra pins on the 4845y, though but
software it should be the same (although I'm talking through my hat -- I
haven't used either chip).
The problem is that these devices are made to connect to a regular uP
bus and so you will need most of the BS2 pins. In particular, 8 data + 4
address + OE + CS + WE = 15 pins. And I'm not sure you can ignore the
interrupt. If you can't that makes 16 pins which consumes a BS2. You
could add a PAK-IV (www.al-williams.com/awce/pak4.htm) or use a BS2P40,
I suppose.
If you read the timing diagrams for the bq4845y, it looks like you can
jam OE and CS low. However, you'd still need to tie WE to an I/O pin so
that's 13 pins. A little better depending on what you need to do.
Say you connect the data to P0-P7. You can access it as INL or OUTL.
Then the address could go to P8-P11. That's INC and OUTC. So the general
sequence for a read will be (using cycle 1 where OE and CS are just low
all the time):
WE CON 12
ABUS VAR OUTC
DBUSIN VAR INL
DBUSOUT VAR OUTL
X var byte ' arbitrary value
' one time set up
DIRS=%0001111100000000 ' adresses are outputs, databus and unused are
inputs, WE is P12
HIGH WE ' WE
' do a read
ABUS=1 ' read register one
'Pause Taa ' This should be 70nS the Stamps turn around time should be
' large enough that you don't really need a pause here at all
X = DBUSIN
Writing would be similar but you'd need to turn off WE, wait (probably
don't have to really wait because the Stamp's interinstruction time is
larger than Twz and change DIRL to $FF. Then drive DBUSOUT to the data
value required, hold it (probably not necessary), and raise WE. Then
turn DIRL back to $00. You probably want some small resistors in the
databus because you may both be trying to drive the databus at the end
of the write cycle. The data sheet doesn't show a no CS write cycle and
this is probably why. But I bet it would work if you included small
resistors between the data pins of the Stamp and the data pins of the
chip.
The alternative would be to use another pin for CS and obey the timing
diagrams.
That should get you started. I think if you just read the other data
sheet, it will be more clear to you!
If you are just making a few of something and need a clock look at Hi
Tech garage or Solutions cubed -- both have real time clocks that are
much easier to use with a Stamp.
Al Williams
AWC
* NEW KIT: Need a 5V Power Supply?
http://www.al-williams.com/awce/ps1.htm
>
Original Message
> From: mysemicon2000 [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=KGGM_CYELS347F36J_-eTXPDW2_qxMa0REfL_uBrCsjyVJeRFD_vWtf78lBlYVxfey-7Jsc409wwv0281NHYB2vt]semiconductor@p...[/url
> Sent: Friday, December 28, 2001 8:15 AM
> To: basicstamps@yahoogroups.com
> Subject: [noparse][[/noparse]basicstamps] RTC Challenge
>
>
> Hi,
>
> I have a Real Time Clock Challenge to BS2 programmers, the RTC is
> TI's bq4847y, and the price is whichever of the three RTC of your
> choice:
>
> bq4847y
> bq4850y
> bq4822y
>
> Datasheet available at http://www.ti.com.
>
> Thanks.
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the
> Subject and Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
bq4850y
bq4822y
--- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
>
> Well, a few things to think about. First, the bq4847y data sheet is
> messed up. It mentions that the data you need is in Tables 1 and 2,
but
> there are no tables 1 and 2. This is a problem. A little more
reading
> shows that the device is functionally the same as a bq4845y -- that
data
> sheet is complete! There are few extra pins on the 4845y, though but
> software it should be the same (although I'm talking through my
hat -- I
> haven't used either chip).
>
> The problem is that these devices are made to connect to a regular
uP
> bus and so you will need most of the BS2 pins. In particular, 8
data + 4
> address + OE + CS + WE = 15 pins. And I'm not sure you can ignore
the
> interrupt. If you can't that makes 16 pins which consumes a BS2. You
> could add a PAK-IV (www.al-williams.com/awce/pak4.htm) or use a
BS2P40,
> I suppose.
>
> If you read the timing diagrams for the bq4845y, it looks like you
can
> jam OE and CS low. However, you'd still need to tie WE to an I/O
pin so
> that's 13 pins. A little better depending on what you need to do.
>
> Say you connect the data to P0-P7. You can access it as INL or OUTL.
> Then the address could go to P8-P11. That's INC and OUTC. So the
general
> sequence for a read will be (using cycle 1 where OE and CS are just
low
> all the time):
>
> WE CON 12
> ABUS VAR OUTC
> DBUSIN VAR INL
> DBUSOUT VAR OUTL
> X var byte ' arbitrary value
>
> ' one time set up
> DIRS=%0001111100000000 ' adresses are outputs, databus and unused
are
> inputs, WE is P12
> HIGH WE ' WE
>
> ' do a read
> ABUS=1 ' read register one
> 'Pause Taa ' This should be 70nS the Stamps turn around time
should be
> ' large enough that you don't really need a pause here
at all
> X = DBUSIN
>
>
> Writing would be similar but you'd need to turn off WE, wait
(probably
> don't have to really wait because the Stamp's interinstruction time
is
> larger than Twz and change DIRL to $FF. Then drive DBUSOUT to the
data
> value required, hold it (probably not necessary), and raise WE. Then
> turn DIRL back to $00. You probably want some small resistors in the
> databus because you may both be trying to drive the databus at the
end
> of the write cycle. The data sheet doesn't show a no CS write cycle
and
> this is probably why. But I bet it would work if you included small
> resistors between the data pins of the Stamp and the data pins of
the
> chip.
>
> The alternative would be to use another pin for CS and obey the
timing
> diagrams.
>
> That should get you started. I think if you just read the other data
> sheet, it will be more clear to you!
> If you are just making a few of something and need a clock look at
Hi
> Tech garage or Solutions cubed -- both have real time clocks that
are
> much easier to use with a Stamp.
>
> Al Williams
> AWC
> * NEW KIT: Need a 5V Power Supply?
> http://www.al-williams.com/awce/ps1.htm
>
>
> >
Original Message
> > From: mysemicon2000 [noparse][[/noparse]mailto:semiconductor@p...]
> > Sent: Friday, December 28, 2001 8:15 AM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] RTC Challenge
> >
> >
> > Hi,
> >
> > I have a Real Time Clock Challenge to BS2 programmers, the RTC is
> > TI's bq4847y, and the price is whichever of the three RTC of your
> > choice:
> >
> > bq4847y
> > bq4850y
> > bq4822y
> >
> > Datasheet available at http://www.ti.com.
> >
> > Thanks.
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > from the same email address that you subscribed. Text in the
> > Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >
I just need to set the RTC for a certain time and set an alarm(so one
time programming only ). Then the rest the BS2 will just read data
from it.
Maybe you can help me out.
--- In basicstamps@y..., "Al Williams" <alw@a...> wrote:
>
> Well, a few things to think about. First, the bq4847y data sheet is
> messed up. It mentions that the data you need is in Tables 1 and 2,
but
> there are no tables 1 and 2. This is a problem. A little more
reading
> shows that the device is functionally the same as a bq4845y -- that
data
> sheet is complete! There are few extra pins on the 4845y, though but
> software it should be the same (although I'm talking through my
hat -- I
> haven't used either chip).
>
> The problem is that these devices are made to connect to a regular
uP
> bus and so you will need most of the BS2 pins. In particular, 8
data + 4
> address + OE + CS + WE = 15 pins. And I'm not sure you can ignore
the
> interrupt. If you can't that makes 16 pins which consumes a BS2. You
> could add a PAK-IV (www.al-williams.com/awce/pak4.htm) or use a
BS2P40,
> I suppose.
>
> If you read the timing diagrams for the bq4845y, it looks like you
can
> jam OE and CS low. However, you'd still need to tie WE to an I/O
pin so
> that's 13 pins. A little better depending on what you need to do.
>
> Say you connect the data to P0-P7. You can access it as INL or OUTL.
> Then the address could go to P8-P11. That's INC and OUTC. So the
general
> sequence for a read will be (using cycle 1 where OE and CS are just
low
> all the time):
>
> WE CON 12
> ABUS VAR OUTC
> DBUSIN VAR INL
> DBUSOUT VAR OUTL
> X var byte ' arbitrary value
>
> ' one time set up
> DIRS=%0001111100000000 ' adresses are outputs, databus and unused
are
> inputs, WE is P12
> HIGH WE ' WE
>
> ' do a read
> ABUS=1 ' read register one
> 'Pause Taa ' This should be 70nS the Stamps turn around time
should be
> ' large enough that you don't really need a pause here
at all
> X = DBUSIN
>
>
> Writing would be similar but you'd need to turn off WE, wait
(probably
> don't have to really wait because the Stamp's interinstruction time
is
> larger than Twz and change DIRL to $FF. Then drive DBUSOUT to the
data
> value required, hold it (probably not necessary), and raise WE. Then
> turn DIRL back to $00. You probably want some small resistors in the
> databus because you may both be trying to drive the databus at the
end
> of the write cycle. The data sheet doesn't show a no CS write cycle
and
> this is probably why. But I bet it would work if you included small
> resistors between the data pins of the Stamp and the data pins of
the
> chip.
>
> The alternative would be to use another pin for CS and obey the
timing
> diagrams.
>
> That should get you started. I think if you just read the other data
> sheet, it will be more clear to you!
> If you are just making a few of something and need a clock look at
Hi
> Tech garage or Solutions cubed -- both have real time clocks that
are
> much easier to use with a Stamp.
>
> Al Williams
> AWC
> * NEW KIT: Need a 5V Power Supply?
> http://www.al-williams.com/awce/ps1.htm
>
>
> >
Original Message
> > From: mysemicon2000 [noparse][[/noparse]mailto:semiconductor@p...]
> > Sent: Friday, December 28, 2001 8:15 AM
> > To: basicstamps@y...
> > Subject: [noparse][[/noparse]basicstamps] RTC Challenge
> >
> >
> > Hi,
> >
> > I have a Real Time Clock Challenge to BS2 programmers, the RTC is
> > TI's bq4847y, and the price is whichever of the three RTC of your
> > choice:
> >
> > bq4847y
> > bq4850y
> > bq4822y
> >
> > Datasheet available at http://www.ti.com.
> >
> > Thanks.
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@y...
> > from the same email address that you subscribed. Text in the
> > Subject and Body of the message will be ignored.
> >
> >
> > Your use of Yahoo! Groups is subject to
> > http://docs.yahoo.com/info/terms/
> >