|
Forum Index : Microcontroller and PC projects : Picomite
| Author | Message | ||||
| dpcons Newbie Joined: 20/05/2022 Location: United StatesPosts: 8 |
Hi folks, Just started working with Picomite and MMBasic. Having some fun with I2c displays and sensors but can't seem to get SD Card working. Tried SPI and SPI2. Keep getting error messages when I try to perform SetPin command. Regardless of the pin I select for MISO/SP2 RX, I get the "Reserved" message for that pin. I've set the system SPI configuration and the SD Card CS pin and no issue there. [7] SetPin gp28, gp26, gp27, SPI2 Error : Pin 34 is reserved on startup Same problem using first SPI. What am I doing wrong? Thanks Dan |
||||
| Mixtel90 Guru Joined: 05/10/2019 Location: United KingdomPosts: 8300 |
I'm not sure what you are doing with SETPIN that's relative to SD cards. It's not needed. On the non-VGA PicoMite you can use either: OPTION SYSTEM SPI CLKpin, MOSIpin, MISOpin OPTION SDCARD CSpin or you can use OPTION SDCARD CSpin, CLKpin, MOSIpin, MISOpin The latter is the only option for a PicoMite VGA edition. Note that when you use OPTION SYSTEM SPI you must use a valid hardware port (CSpin can be any pin, it's not tied to a particular port). If you are using the longer OPTION SDCARD option then you can use any pins. Once you have used a pin in an OPTION command then it's locked to that function. You can only release it by using OPTION something_or_other DISABLE. Until then, attempting to use SETPIN on that pin will bring up a Reserved error. Welcome to the TBS forum! Have fun. :) Edited 2022-05-21 05:55 by Mixtel90 Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
| dpcons Newbie Joined: 20/05/2022 Location: United StatesPosts: 8 |
Thanks Mick, I've resolved the issue. When I first tried to open and append to a file, I got an error message saying SD card wasn't found, although I thought I'd set up configuration correctly. When you're flailing around, you forget things you've done. Again, thanks for your timely response. Cheers, Dan |
||||
| steve_e Newbie Joined: 01/01/2015 Location: United StatesPosts: 1 |
Hi All, I've been using the Micromite for a number of years in various projects and recently started to migrate to the Picomite. I'm using a OLED 4X20 display in the standard 4 bit mode that I've used successfully with the PIC Micromite. With the Picomite I'm experiencing an error associated with the "BITBANG LCD CMD d" which generates a "Invalid syntax" error when the program is executed. "BITBANG LCD DATA d" also results in the same "Invalid syntax" error. I am able to write some basic strings to the display but have used the LCD CMD and DATA in the past to deal with some non-standard display setup. I'm running Picomite version 5.0704. I can suppress the error using the "On Error IGNORE" feature but I don't observe any activity on the LCD interface signal lines when the "BITBANG LCD CMD d" is executed. I have not yet tried reverting to an earlier version of the Picomite MMBASIC to determine if this does not occur. Any comments or suggestions are welcome. Thanks - Steve Edwards Bitbang LCD INIT GP19, GP18, GP17, GP16, GP21, GP20 'Bitbang LCD CMD 40 un-comment the error below is generated Bitbang LCD 1,1, "12345" [3] Bitbang LCD CMD 40 Error: Invalid syntax |
||||
| matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 10624 |
This is a bug in the firmware. Will fix in the next V5.07.05 beta |
||||
| The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |