| Menu | JAQForum Ver 19.10.27 |
Forum Index : Microcontroller and PC projects : MMBASIC, Explore 100, Picomite graphics display
I do not have the hardware right now but hopefully a simple question. If I boot up a PIC or Pico running MMBasic I will get to the command line. Could I display graphics by just sending immediate commands in sequence to the command line to execute. So in this case I am not actually writing a program and having it render based on commands as usual. I would like to use another program running with another OS to be able to send strings to MMBasic running on a PIC or Pico, such as with an Explore 100 or Picomite card and have the card draw the graphics. Wondering if there is a restriction related to remembering the configuration and not doing something like clearing the screen between commands. Might seem like an odd question but I think I have an application that could use this. I have never tried this, I would normally write a program to draw some graphics, and don't have hardware immediately available to try this out. If it should work I have some hardware at another location I could get next week. Touch capability does not have to work, it is just drawing on the LCD. Thanks |
||||||
The usual (?) way would be for that slave PIC/Pico run a small program reading commands from the master and doing the desired graphics (or other) things. John |
||||||
i believe that some years back there were one or two forum members doing almost exactly what you describe - they were using an MX170 an an I/O expander that accepted text commands to control pin states, set up PWM signals, query switch states, etc. i can't be 100% sure, but i also think some were doing the same for graphics commands to draw on an attached LCD screen - this was before the days of driving VGA or DVI. Geoff and others who were around back then may remember better than me. cheers, rob :-) Edited 2026-05-30 17:57 by robert.rozee |
||||||
On the Pico I think someone did something similar. Had a quick search but didn't find it. Perhaps the slave received commands as serial strings then used Execute to implement them. Edit Another possibility is Peter wrote a program to emulate a PS/2 keyboard. That could be used to send console commands to another. here Edited 2026-05-30 18:12 by phil99 |
||||||
just configure it to use a serial/RS232 console and send ascii strings directly to that. the MX170 only had a serial console, with no other options. later pic32 based ones supported PS/2 keyboards and onboard USB (although this was of limited usefulness as the MX470 et al had less-than-reliable onboard USB). cheers, rob :-) |
||||||
Agreed. The PicoMite + display becomes a MMBasic version of a Nextion HMI |
||||||
Here are several different instances: Serial control of Picomite I have a number of applications where one PicoMite talks to another over serial (or some other device uses serial to talk to a PicoMite. It can be a bare PicoMite which just accepts normal commands, or it can run a program to execute an expected set of commands, or, if a line begins with "!", execute the command which follows on the line. So sending "! pin(GP3)=1" would result in the receiving program doing: EXECUTE "pin(GP3)=1" It's a really handy way to set pins or variables without having to load a new program. There are complications if the sender needs to receive back a confirmation or other response. Some of that is addressed in the link above. |
||||||
You guys are right. I reflashed an Explore 100 with latest code. Pushed a bunch of config and graphics commands and it draws all kinds of stuff, like a graphics card. I knew the command line works on immediate strings, just was not sure I could stream commands in to make it function like a graphics card. Now I just need to get a TTL stream to do the same. Does the 3 pin CON6 take a serial stream on reboot? Or does it need to be configured? Once I get this card working the way I want, I need to fire up a Picomite and try to sort out the same thing but for a VGA or HDMI display. The computer I am hooking to does not have USB and I don't want to have to convert to USB and then convert back. Seems like a waste. |
||||||
It looks like I will ultimately settle on the Picomite because of the HDMI capability. I looked at the reference design to see what is expected for connections. It looks like the PICO console is just TTL at the board pins. The interface to the USB converter just has the two pins. If that is right, then I would assume the serial speed may be fixed or perhaps there is an MM command that will set it to some standard EIA speed. Is that right or wrong? |
||||||
If connecting TTL serial to a computer with RS232 usually requires the signals be inverted. A transistor for each usually works. The MicroMite Plus and MicroMite2 can do the inversion for you, see the MicroMite manual for hardware and setup details. I don't see the inversion option in the PicoMite manual. If using the "B" parameter serial has priority over USB. Edited 2026-05-31 16:38 by phil99 |
||||||
Ok checked it out... After reset, the CON6 serial port is TTL and running at 38.4K. Acts as the console. The pins are 5V tolerant but output is 3.3. So it seems most of my problems are solved. At least I can try a proof of concept with the Explore 100. The PICO 2 TX/RX pins are not 5V tolerant so I need level shifters, at least inward and I need to test an actual board as proof of concept. |
||||||
I don't intend to use RS232 levels. Straight from the UART to the PIC/PICO. I am trying to reduce the amount of circuitry and work down to almost nothing. It appears the LCD driving Micromite Plus chips would be fine if I decide to go that way. Would like to have something much larger than a 7" display, probably closer to 12"+. If I choose to use HDMI then I need to prove out the Picomite. I only need ttl console, HDMI and sound out. Any other functions would be nice but not necessary. Don't need touch screen. Any of these solutions would be cheap and easy to build and not require any difficult soldering, FPGA or CPLD work, or porting and troubleshooting tons of code. Will need to consider getting any stored setup in place. This just has to power up and run at some higher serial speed. Thanks |
||||||
| The Back Shed's forum code is written, and hosted, in Australia. |