Close

Full recovery & mission accomplished

A project log for Gigatron I/O and RAM expander

Adding four SPI ports and up to 128K of banked RAM using nothing more than 4 TTL chips and some wizardry.

Marcel van KervinckMarcel van Kervinck 03/31/2019 at 14:346 Comments

After returning from the VCF, three things needed recovery: 1. the jetlag, 2. a stomach bug and 3. the little brittle breadboard with dummy peripherals. Today it all worked again. And even better: the SPI test routines now load from my laptop into the Gigatron (through an Arduino Uno that acts as a bridge). Now I don't have to type in hex codes anymore, and that should help with our follow-up project: talking to the MicroSD card.

A glimpse of the mountain that is now ahead of us:

And that's just for initialising the card, so you know you can talk to it. The best thing of this? This reassuring quote:

"This is just one example of such an initialization sequence. [...] It’s possible that it may work or not depending on the type of card you use and on its manufacturer. Other similar such flowcharts exist. [...]  Most of the times, you will have to try to implement several of them until you will get it to work"

Now imagine deciphering the FAT file system on top of that. This can easily take the remainder of the year to get right.

Down the rabbit hole we go...

Source: http://www.mayumitokuda.com/2d-illustration/art-stuff/7246032

Discussions

roelh wrote 04/05/2019 at 09:55 point

Hi Marcel, are you aware of http://elm-chan.org/fsw/ff/00index_e.html ? This will do everything that you want.

  Are you sure? yes | no

Marcel van Kervinck wrote 04/05/2019 at 09:57 point

Thanks for the pointer. We don't have a C compiler for the platform :-)

  Are you sure? yes | no

Marcel van Kervinck wrote 04/05/2019 at 09:58 point

It turns out I was aware of their sub-page at http://elm-chan.org/docs/mmc/mmc_e.html . It's a good reference, but everything must be ported one way or another.

  Are you sure? yes | no

Marcel van Kervinck wrote 04/24/2019 at 20:13 point

Developments go fast. At the beginning of this month I couldn't have imagined how to ever tackle FAT support, but today we have the basics of a C cross-compiler working! Pat G. has modified LCC with a Gigatron vCPU backend, and "hello world" works! Pieces are falling in their place.

  Are you sure? yes | no

roelh wrote 04/24/2019 at 20:33 point

How very nice ! Is this a 'tiny' C, or does/will it have all features like arrays, pointers, structures ?

  Are you sure? yes | no

Marcel van Kervinck wrote 04/24/2019 at 20:50 point

[Replying from +2 because of nesting limits] LCC is full ANSI-C, which I guess means C89 in this context. The limits are now in what our backend supports, and there is no standard library yet. So no floats, and 'long ' is 16 bits for the time being.

  Are you sure? yes | no