Home
JAQForum Ver 20.06
Log In or Join  
Active Topics
Local Time 15:51 29 Mar 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PicoMite SD card

Author Message
Kalevi
Newbie

Joined: 28/09/2021
Location: Australia
Posts: 9
Posted: 10:22am 09 May 2022
Copy link to clipboard 
Print this post

Firmware loaded OK. MMBasic running OK. GUI calbrate OK. Picomite demo OK. Typing in  word 'files' brings up message: 'SD card not found'. I have checked for hardware problems (connections, shorts, wrong earths) none found. The card checks OK in another machine.
Mauri
 
thwill

Guru

Joined: 16/09/2019
Location: United Kingdom
Posts: 3807
Posted: 10:29am 09 May 2022
Copy link to clipboard 
Print this post

What does OPTION LIST say ?

Best wishes,

Tom
Game*Mite, CMM2 Welcome Tape, Creaky old text adventures
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9030
Posted: 03:35am 10 May 2022
Copy link to clipboard 
Print this post

As thwill has hinted at, you have to tell MMBASIC that there is an SD card connected.
By default, MMBASIC will assume that it does NOT have an SD card.

From the PicoMite manual, page 38: "SD Card Support"

  Quote  
SD cards use the SPI protocol for communications and this needs to be specifically configured before they can be used. First the “system” SPI port needs to be configured. This is a port that will be used for system use (SD Card, LCD display and the touch controller on a LCD panel).
There are a number of ports and pins that can be used (see the section PicoMite Hardware) but this example uses SPI on pins GP18, GP19 and GP16 for Clock, MOSI and MISO.

OPTION SYSTEM SPI GP18, GP19, GP16

Then MMBasic must be told that there is an SD card attached and what pin is used for the Chip Select signal:

OPTION SDCARD GP22

These commands must be entered at the command prompt (not in a program) and will cause the PicoMite to restart. This has the side effect of disconnecting the USB console interface which will need to be reconnected.
When the PicoMite is restarted MMBasic will automatically initialise the SD card interface. This SPI port will then not be available to BASIC programs (i.e. it is reserved). To verify the configuration you can use the command OPTION LIST to list all options that have been set including the configuration of the SD Card.

Where no other devices share the SPI bus the SD Card can be set up with:

OPTION SDCARD CSpin, CLKpin, MOSIpin, MISOpin

In this case the pins can be assigned completely flexibly and do not need to be capable of SPI operation.

Smoke makes things work. When the smoke gets out, it stops!
 
Kalevi
Newbie

Joined: 28/09/2021
Location: Australia
Posts: 9
Posted: 10:12am 10 May 2022
Copy link to clipboard 
Print this post

The OPTIONs are as suggested by Admin Group except for SDCard:
OPTION SDCARD GP21. In Silicon Chip design GP21 the pin used for SD Card.
PG22 is used for Infrared input.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 8516
Posted: 10:21am 10 May 2022
Copy link to clipboard 
Print this post

If, as implied,  you are using the SC design then most of us have no access to the design which make it difficult to help. Normally, if the connections and options are correct, issues with SD are solved with improved power supply and/or decoupling the SD supply from the main supply as in my designs.
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024