Sending commands via SPI

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times
Contact:

Sending commands via SPI

Postby Tony Brown » Wed Nov 01, 2017 8:55 pm

Hi,

Im trying to send a four bit command to an eeprom to make it format itself. I am using a pic 12f1840. When I monitor the SDO on a scope there is no data transmitted. Can anyone help?

I have attached the flowcode file.

Many thanks

Tony

download/file.php?mode=view&id=24848
Attachments
EPROM ERASER.fcf
(14.5 KiB) Downloaded 88 times

User avatar
Benj
Matrix Staff
Posts: 14243
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4369 times
Been thanked: 4103 times
Contact:

Re: Sending commands via SPI

Postby Benj » Mon Nov 06, 2017 11:31 am

Hi Tony,

Your program seems to have 3 SPI components in it. Maybe get rid of the components your not using.

If your going to monitor the SDO pin with the scope then try adding a while 1 loop around the send byte component macros to ensure your not simply missing the data.

What EEPROM are you using?

Tony Brown
Posts: 81
Joined: Wed Jun 20, 2012 9:59 pm
Has thanked: 36 times
Been thanked: 5 times
Contact:

Re: Sending commands via SPI

Postby Tony Brown » Mon Nov 06, 2017 9:28 pm

Hi,
Thanks for your response.

The eeprom I'm wanting to erase is an AT45DB321D.

The eeprom needs a four byte command sequence: C7H, 94H, 80H and 9AH.

I have not used the SPI command before so any help will be most appreciated.

Regards Tony

User avatar
medelec35
Valued Contributor
Valued Contributor
Posts: 8394
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2395 times
Been thanked: 3425 times
Contact:

Re: Sending commands via SPI

Postby medelec35 » Sat Dec 29, 2018 6:00 pm

Hi Tony,
I know this topic is over a year old, but did you resolve your issue?
Martin

If you read a post that is useful, please show appreciation by clicking on thumbs up Icon.