G30 Design Project Continued

Gus, why would I want EPROM over EEPROM?

And John why do you suggest SD card over EEPROM? From my research, SD cards are the most complicated and require more pins than EEPROM (at least I2C EEPROMs). Or are they less complicated since the FAT file systems are readibly available whereas EEPROM would require me to write a custom file system?

The required storage space shouldn’t need to be very big at all - could probably get away with only storing 1 array as the other 1 will not change and can be added to the deployment code. The 1 array that definitely needs to be stored will be 32 unsigned ints ranging from 0 to ~600000, most of them more than 10000. How can I estimate how many kB’s are needed?

You need eeprom or SPI dataflash, depending on how much memory you need. Or use SD cards.

1 Like

What would be faster to implement / easier for someone with zero EEPROM or SD experience? Very small amount of memory needed (one array of 32 unsigned integers).

From what I read there are already drivers written for SD cards (FAT16 and FAT32) and the only code I would need to write is initialization. Not sure if there is any prewritten NETMF drivers for EEPROM? Sounds like additional coding is required for EEPROM?

Waiting for TinyCLRS is not an option I am in the last stage of this design before production.

SD cards are easy to use as you can relocate the content across devices. They also support massive capacity in comparison. But they come with a level of complexity in power handling and in application programming to ensure the file system integrity isn’t jeopardised.

Nearly any I2C or SPI flash/eeprom will be OK, as long as you spend some time to make sure it’ll cover the data you need and the write cycles you expect. Start on digikey/E14 and figure out what you need

The storage does not need to be transferred between devices as it will be device specific.

Do you have suggestions on estimating data sizes of integer arrays in NETMF?

I think I need 2 MB, would EEPROM be easiest for this?

2 megabytes? That’s a pretty big device. Also be careful since they talk about BIT not BYTE.
I’d jump on a site like Smart | Connected | Secure | Microchip Technology and make sure you know what you’re getting yourself into, and then go searching for a specific part matching a parameterised search on digikey etc to find pricing.

Oops I mixed up bit and byte in my calculations silly me…its been a long weekend of work. I need around 2000 bits of storage lol probably less than that

1 Like

Yea then an I2C eeprom

https://www.sparkfun.com/products/525

2 Likes

thank you! That is exactly what I am looking for (except I couldn’t find that exact one on digikey, I’ll search for similar). How difficult is the I2C communication going to be? I hear it is difficult for things like displays but maybe this is super simple…the driver snippet I looked at was very straightforward.

Does anyone know if it is possible to daisychain an L6470 motor driver and SPI to parallel FIFO chip? Or does daisychaining only work with two of the same chips? Pretty short on pins and this would really cut me a break. However, the L6470 will only set the correct register values with an SPI clock frequency of 1000 kHz in SPI config, I am wondering if I will have SPI issues with the FIFO chip as well - I am pretty sure a parallel port of this nature would require a clock frequency of a few MHz (not sure if my source was accurate but he is usually on point).

Or does the FIFO chip set a different frequency since it has all the bytes queued up?

How come I can’t use the G30 internal flash? Datasheet says it has 128 kB internal flash. I would technically only need to write to it 1 time then just read from it at each power up.

Not sure what I am missing here (assuming 128 Kb is adequate for my needs),

Hang on, what are these values? Are they static or do they change?

static, they are saved during a calibration routine he first time the G30 is powered on (after it is on)

As Gus mentioned, the config area is often misused and isn’t designed to be used/rewritten as part of your general app. For a dollar, you can buy a 24LC256 and be completely in control.

2 Likes

I would think that the configuration area was meant to store calibration information for a specific device. That is, write once and read many.

The API is simple. Read it and experiment.

I believe the configuration area does not have garbage collection, so if you keep rewriting, you will run out of space. To reclaim the configuration area, reinstall the firmware.

3 Likes

Reinstall the firmware. Yea ok, don’t use the config section all willy nilly.

I think hwalker’s problem is not the cost but the code and pcb requirements to integrate that chip into the solution.

Ya cost isn’t the issue here its waiting on EEPROMs to arrive as well as me only have a couple extra pins which I may end up needing for FIFO chips.

I only need to write to the config area ONE TIME EVER, then just read from it with each power up. There is zero reason to ever need to write a second time except for if a customer returns the device years down the road.

I was just told multiple times how easy it is to misuse it now you tell me to figure it out myself lol. Can I have some advice on how to use it properly? I already looked at the name space and it had no do’s and don’ts that I saw easily other than what we just discussed with not rewriting it.

@hwalker_MIWV, Will you know before the device is permanently deployed, what the values will be? If you you could read out the values then hard code them into the firmware.

I already hard code as much as I can - there is one array which must be created and stored after the code is deployed, its basically fine tuning of the numbers that were guestimated in the hard coding.

If I can use the configuration sector that would be so much easier than adding another component.

John, does it matter if I am using 16 bit or 32 bit ints for sending position commands to the L6470? I know when reading the registers 32 bit Ints should be used but am not sure about sending the commands. I am still having issues using GoTo() - if I use ResetPos() and try to set absolute position to zero, then send a GoTo() command. The response to GoTo() is completely wrong and goes half a revolution or more past where it should be going.