Atmel Dataflash
Archiver
Posts: 46,084
Hi,
I'm tryin to use Atmel DataFlash with a BS2. I've followed Tracy's
code but I can not get it to work. The chip that I am using is a
AT45DB081B chip, not a AT 45D0. Has anybody had experience with these
chips?
Here's the code
temp = 138
'send data to buffer 1
'opcode $84, 15 dont care bits, 9 address bits
debug "sending", cr
low atcs
shiftout sdo,sck,1,[noparse][[/noparse]$84\8,0\15,0\9]
shiftout sdo,sck,1,[noparse][[/noparse]temp\8]
high atcs
temp = 0
pause 100
'read data back from buffer 1
'opcode $54, 15 dont care bits, 9 address bits, 8 dont care bits
low atcs
shiftout sdo,sck,1,[noparse][[/noparse]$54\8,0\15,0\9,0\8]
shiftin sdi,sck,2,[noparse][[/noparse]temp\8]
debug "got ", dec temp, cr
high atcs
I never get any valid data.
Any help appreciated.
Thanks again.
Simon
I'm tryin to use Atmel DataFlash with a BS2. I've followed Tracy's
code but I can not get it to work. The chip that I am using is a
AT45DB081B chip, not a AT 45D0. Has anybody had experience with these
chips?
Here's the code
temp = 138
'send data to buffer 1
'opcode $84, 15 dont care bits, 9 address bits
debug "sending", cr
low atcs
shiftout sdo,sck,1,[noparse][[/noparse]$84\8,0\15,0\9]
shiftout sdo,sck,1,[noparse][[/noparse]temp\8]
high atcs
temp = 0
pause 100
'read data back from buffer 1
'opcode $54, 15 dont care bits, 9 address bits, 8 dont care bits
low atcs
shiftout sdo,sck,1,[noparse][[/noparse]$54\8,0\15,0\9,0\8]
shiftin sdi,sck,2,[noparse][[/noparse]temp\8]
debug "got ", dec temp, cr
high atcs
I never get any valid data.
Any help appreciated.
Thanks again.
Simon
Comments
Take a look at the hardware and software again.
Tracy's code and the code I sent to you does work.
David
Original Message
From: "smorillas" <egroups@d...>
To: <basicstamps@yahoogroups.com>
Sent: Wednesday, June 26, 2002 9:31 PM
Subject: [noparse][[/noparse]basicstamps] Atmel Dataflash
> Hi,
>
> I'm tryin to use Atmel DataFlash with a BS2. I've followed Tracy's
> code but I can not get it to work. The chip that I am using is a
> AT45DB081B chip, not a AT 45D0. Has anybody had experience with these
> chips?
>
> Here's the code
>
> temp = 138
>
> 'send data to buffer 1
> 'opcode $84, 15 dont care bits, 9 address bits
>
> debug "sending", cr
>
> low atcs
> shiftout sdo,sck,1,[noparse][[/noparse]$84\8,0\15,0\9]
> shiftout sdo,sck,1,[noparse][[/noparse]temp\8]
> high atcs
>
>
> temp = 0
> pause 100
>
> 'read data back from buffer 1
> 'opcode $54, 15 dont care bits, 9 address bits, 8 dont care bits
>
> low atcs
> shiftout sdo,sck,1,[noparse][[/noparse]$54\8,0\15,0\9,0\8]
> shiftin sdi,sck,2,[noparse][[/noparse]temp\8]
> debug "got ", dec temp, cr
> high atcs
>
> I never get any valid data.
>
> Any help appreciated.
>
> Thanks again.
>
> Simon
>
>
> 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/
>
>
>
> Simon,
>
Thanks. The code below does work. The problem was that The RST and WP
pins do need to be pulled high. The datasheet specifies that they are
internally pulled high, but the chip did not work until I applied the
5v onto them.
Thanks again
> Take a look at the hardware and software again.
>
> Tracy's code and the code I sent to you does work.
>
> David
>
>
Original Message
> From: "smorillas" <egroups@d...>
> To: <basicstamps@y...>
> Sent: Wednesday, June 26, 2002 9:31 PM
> Subject: [noparse][[/noparse]basicstamps] Atmel Dataflash
>
>
> > Hi,
> >
> > I'm tryin to use Atmel DataFlash with a BS2. I've followed Tracy's
> > code but I can not get it to work. The chip that I am using is a
> > AT45DB081B chip, not a AT 45D0. Has anybody had experience with
these
> > chips?
> >
> > Here's the code
> >
> > temp = 138
> >
> > 'send data to buffer 1
> > 'opcode $84, 15 dont care bits, 9 address bits
> >
> > debug "sending", cr
> >
> > low atcs
> > shiftout sdo,sck,1,[noparse][[/noparse]$84\8,0\15,0\9]
> > shiftout sdo,sck,1,[noparse][[/noparse]temp\8]
> > high atcs
> >
> >
> > temp = 0
> > pause 100
> >
> > 'read data back from buffer 1
> > 'opcode $54, 15 dont care bits, 9 address bits, 8 dont care bits
> >
> > low atcs
> > shiftout sdo,sck,1,[noparse][[/noparse]$54\8,0\15,0\9,0\8]
> > shiftin sdi,sck,2,[noparse][[/noparse]temp\8]
> > debug "got ", dec temp, cr
> > high atcs
> >
> > I never get any valid data.
> >
> > Any help appreciated.
> >
> > Thanks again.
> >
> > Simon
> >
> >
> > 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/
> >
> >
> >