![]() |
Forum Index : Microcontroller and PC projects : Request for something minor
Page 1 of 2 ![]() ![]() |
|||||
Author | Message | ||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Due to its nature, I am addressing this request ultimately to Geoff, however I am happy to hear everyone's opinion or suggestions about that. It is a very simple thing and I can easily do it myself, however with what I am designing at the moment (around MM+) I would very much prefer if it follows the mainstream firmware only. The proposal is to have the two MCU lines PGD and PGC, normally used for programming, and usually for nothing else, reserved (maybe with an OPTION) to indicate the current SD card drive up to four drives - A:, B:, C:, or D: I mean, just an indication and nothing else, so that will not affect any of the currently designed MM+ boards. The idea behind this is to allow an optional external 4:1 switch to use the single CS line which MM+ is driving for SD, to select up to four drives. The programming lines don't mind having this additional input load on them (I have checked). Of course this will need the addition of commands for changing drive, effectively to set these two lines in a certain combination 00, 01, 10, or 11, according to the drive. The lines can be otherwise held in a default state by their built-in pull-ups. Not sure did I manage to explain it well, but hopefully it makes sense. Thanks! http://rittle.org -------------- |
||||
Chris Roper Senior Member ![]() Joined: 19/05/2015 Location: South AfricaPosts: 280 |
I am not sure it would work for the MicroMite, too few pins as it is. But then you did say MM+ and SD Card, nether of which are currently on the Micromite 170. But if the PGD and PDC lines were to be reserved for any function I would rather it be the Console. Those pins are dedicated anyway and you don't need the console attached at the same time as the ICSP. http://caroper.blogspot.com/ |
||||
donmck![]() Guru ![]() Joined: 09/06/2011 Location: AustraliaPosts: 1314 |
Could a cfunction handle this? Cheers Don... https://www.dontronics.com |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6273 |
There is nothing to stop you using any two IO pins to control an external multiplexer now. You will have to decide if you want to worry about the other SDcard lines - card present and write protect. I don't see why there has to be any changes to MMBasic to achieve this. Jim VK7JH MMedit |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
The changes are needed because currently MMbasic can't process file names with drive letters in them. Sure, I can use any two pins, but I can't easily add this needed functionality from within the MMbasic itself (still not sure if a C function can do it, learning that stuff) http://rittle.org -------------- |
||||
factus10 Regular Member ![]() Joined: 30/12/2014 Location: United StatesPosts: 45 |
Oh! You're looking for a physical drive select (which you said in your first post, of course). Does MM support more than drives A and B right now? And it sounds like you plan to wire up three (or four?) SD card sockets? Or, based on your last post, you need MM to support drive letters in filespecs? I think the latter would be easier for Geoff to add to the code and would make more sense. |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10281 |
The issue with this suggestion is that you need to send a particular code sequence to an SD card to wake it up and tell it that it is to work in SPI mode, this is done with the SPI speed set to not more than 400Kbps. To swap between multiple cards you would also need the card detect enabled and somehow disabled when you swap cards so that the software knows to initialise the next card |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
There are very convenient dual 4:1 multiplexer/multiplexers in many forms and manufacturers. SN74CBTLV3253 for example. I am aware that the card detect signal should be multiplexed too, that's why suggested this method in order to keep everything existing compatible. Alternatively the most obvious way would be to let MM+ dedicate a single pin for each card, by adding more parameters to the OPTION SDCARD command. But that would eat up to 8 MCU pins, while by keeping the current form only two extra pins will be needed, and they will be those normally left unused by most of the people. http://rittle.org -------------- |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10281 |
I was thinking of something just slightly more sophisticated that would allow you to do what you want from Basic with no changes to the MM+ firmware. You could just use any two pins to drive the card select and card detect multiplexors from Basic. Then when a change is made fire a monostable that ORs with the new card detect (assuming card detect is active low) forcing a temporary period of non-detect. That way when the monostable times out, and assuming there is a card in the slot, the MM+ firmware would recognise that a new card needs initialising before use. |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Ah, you are thinking in the opposite direction - how to make MMbasic detect amongst a few cards :) In my original I assume that it is already known whether a card is installed and where, but currently the system lacks the ability to control the selection of drives. http://rittle.org -------------- |
||||
Geoffg![]() Guru ![]() Joined: 06/06/2011 Location: AustraliaPosts: 3287 |
My intention with the Micromite Plus was to create a powerful controller rather than another Maximite style computer. I know that in some ways it looks like a computer but I don't want to go too far down that route because then I would have to start adding too many extra features like sprites, command shells, etc. As a result, I am not keen on adding general computer features like support for multiple SD cards. The other concern is that I believe that there would be little demand for multiple drives anyway. My worry here is that the language is already complex enough and adding features to satisfy a single particular need will just make it even harder for newcomers to get started with the Micromite. Another issue is that it is not that simple to add support for multiple drives. There needs to be a way to switch the default drive and extra code to pick out the drive letter. So, thanks for the idea (which is good) but I would prefer to not implement it on the Micromite. Geoff Geoff Graham - http://geoffg.net |
||||
kiiid Guru ![]() Joined: 11/05/2013 Location: United KingdomPosts: 671 |
Thanks for the response Geoff. It is no big issue anyway as the support can be added in software in the form of a C function driver or something like that in the future. As you say, it is a specific thing, applicable only in computer-oriented designs. My MX470-based laptop is nearly ready to go to the factory (after months of thinking and design). I take the route with multiple cards support in hardware, however keeping full compatibility with the MM+ firmware. http://rittle.org -------------- |
||||
viscomjim Guru ![]() Joined: 08/01/2014 Location: United StatesPosts: 925 |
I have to agree w Geoff here. This is a great and powerful controller. I am very happy with this fact. Controller vs computer >>> in my opinion, umite = ucontroller. |
||||
Positron![]() Newbie ![]() Joined: 09/08/2015 Location: ArgentinaPosts: 15 |
Hi Geoff, your modestly named Micromite + is so well thought and powerfull enough that it can serve both worlds, uController and uComputer ! ![]() ![]() Maybe adding a command to remove directories in the SD file system and support for a USB keyboard (so we can attach one of those wireless mini-keyboards) and it will be the perfect versatile system for hobbysts. I'm cuurently using it as a "bench companion uComputer" to deal with I2C, SPI, PWM and simple signal/pulse generation, without the need for a PC. Regards, JL. |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9603 |
Welcome to the forums, Positron. ![]() Any relation to the Positron Relay? ![]() Geoff has indicated that he is going to look at providing USB keyboard support in the not too distant future, but for right now, it is still PS/2. Smoke makes things work. When the smoke gets out, it stops! |
||||
Positron![]() Newbie ![]() Joined: 09/08/2015 Location: ArgentinaPosts: 15 |
Hi Grogster, thanks for welcoming me (is it an English word ?) to this great forum. Lately I've been doing mostly AVR/Arduino hobby projects but many years ago my first weapons were the 8085, 8051, Z80, CP/M, BASIC-80, then a gap until the BASIC Stamp, PICs... and just now I discovered this wonderful Micromite world. I'm brushing up my BASIC skills, learning a lot from you Gurus! Started with the Micromite 28 pin DIP assembling one of Phil's great PCBs along the VT-100 emulator (another brillant creation from Geoff). Now testing the Micromite+. Glad that Geoff will look into adding USB keyboard support in the future; in the meantime I'm trying to use HobbyTronics USB-Host module with the Serial keyboard emulation software. The problem with it is that it doesn't send VT100 compatible escape sequences when pressing the arrow or function keys, so the Editor is not working. I've contacted the developer and maybe he will add a full VT100 compatibility mode in future releases. OK enough break for now, back to reading the MMite advanced manual ![]() |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6273 |
One way around the problem will be to use a PIC (almost any will do) to interface between the USB-Host module and the Micromite+ It should be reasonably easy to convert the special codes to VT100. Jim VK7JH MMedit |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9603 |
If you mean my nom-de-plume, no, it is a made-up word. Grog, meaning booze/alcohol. I used to do a lot of drinkin'. That name was given to me by my drinking buddies of the day. I don't drink anymore - sober now for 10 months, which after 20-odd years of non-stop drinkin', is actually a nice change. Smoke makes things work. When the smoke gets out, it stops! |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2934 |
So should we call you 'Sobster' from now on? ![]() |
||||
Grogster![]() Admin Group ![]() Joined: 31/12/2012 Location: New ZealandPosts: 9603 |
...doesn't have quite the same ring to it, does it?(rhetorical!) So, no, you can't. ![]() ![]() Besides - I need to keep that open in case I decided to go back one day. ![]() Smoke makes things work. When the smoke gets out, it stops! |
||||
Page 1 of 2 ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |