![]() |
Forum Index : Microcontroller and PC projects : PicoMite/PicoMiteVGA V5.07.04 betas
![]() ![]() ![]() ![]() |
|||||
Author | Message | ||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 622 |
Hi Peter, Sorry, in that case I must have wired it up wrong :-( I'll try again with your settings, if I can get it working, it would be great, using a whole Pi, even an old one, just to be a clock, did seem like a waste. Many thanks for all your hard work. Regards Kevin I'll post pics with case & larger screen once I succeed :-) |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 622 |
Hi Peter, Of course it's working perfectly :-) It was the link you gave me to your 2017 post for the correct pin wiring that fixed it, I was using some incorrect pin wiring information :-( Thank you for pointing me in the right direction, might it be worth putting the correct pin wiring in the user manual, (and the fact that your 9481 driver also works with 9486 displays) I'd have never found that post without your help. Regards, Kevin. Edited 2022-02-13 08:33 by Bleep |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 622 |
I have also found that on my display, there was a resistor labeled "LED Function" which when I traced it through looked like by moving it to a second location I could activate the variable back light, which comes out on pin 15 of the LCD connector, and it works. :-) Regards, Kevin. |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Tried the following:- ?mm.ver 5.070402 > ? mm.device$ PicoMite > memory Program: 1K ( 1%) Program (5 lines) 123K (99%) Free RAM: 0K ( 0%) 0 Variables 0K ( 0%) General 156K (100%) Free > list CLS Option gui controls 10 ' failing line Print "made it here!" ' in fact, we did NOT make it here!! GUI displaybox #1,100,100,100,50,RGB(blue),RGB(red) CtrlVal(#1) = "Test" > run ' at this point the Picomite drops connection, ' having failed at the OPTIONS GUI CONTROLS line ' Re connecting and pressing Enter returns the prompt > Seems that the OPTION GUI CONTROLS 10 is crashing the system. Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
panky![]() Guru ![]() Joined: 02/10/2012 Location: AustraliaPosts: 1114 |
Apologies Peter, please ignore the post re CONTROLS. I misunderstood usage - the command can only be run from the command line and the disconnect/re-connect is the same as setting other options. Thanks for a great program, Doug. ... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it! |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 622 |
Finished 3.5" Raspberry Pi touch display, attached to a Pico, & RTC, in a perspex case that came with the display, Display on Ebay. Many thanks to Peter for PicoMite and pointing me in the correct direction for connecting the diplay and the fact that even though it was a ILI9486, the PicoMite ILI9481 driver worked fine, which it does. :-) Because I got the back screen brightness working I have also done automatic brightness, depending on time of year and time of day, it can be overriden with the touch screen brightness control. Thanks to all involved, Regards, Kevin. ![]() ![]() Edited 2022-02-16 22:14 by Bleep |
||||
Frank N. Furter Guru ![]() Joined: 28/05/2012 Location: GermanyPosts: 946 |
@Bleep: Thank you very much for your phantastic project: ![]() Currently still without RTC... @homa ...and thanks for pointing out the beautiful display! (https://www.thebackshed.com/forum/ViewTopic.php?FID=16&TID=14512) Frank |
||||
Amnesie Guru ![]() Joined: 30/06/2020 Location: GermanyPosts: 576 |
Impressive project! Cool! |
||||
Bleep Guru ![]() Joined: 09/01/2022 Location: United KingdomPosts: 622 |
Hi Frank, Sorry, I haven't updated the original post with the latest, which will fill a 480*320 screen, See below. Regards Kevin. solarsys.zip Edited 2022-02-19 02:35 by Bleep |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
PicoMite/PicoMiteVGA V5.07.04b4 https://geoffg.net/Downloads/picomite/PicoMite_Beta.zip Implements READ SAVE and READ RESTORE These allow a subrountine to read its own data whilst preserving the data pointers for the main program e.g. dim a(20) data 0,1,2,3,4,5,6,7,8,9 data 10,11,12,13,14,15,16,17,18,19 for i=0 to 13 read a(i) next i readmydata for i=14 to 19 read a(i) next i for i = 0 to 19 if a(i)<>i then print i,"ERROR",a(i) next i end ' sub readmydata local s$(7) local i read save restore testlabel for i=0 to 6 read s$(i) next i read restore for i = 0 to 6 print s$(i); next i print "" end sub testlabel: data b,c,d,e,f,g,h |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5021 |
@Peter, I have looked into using the picomite as a smart IO device for MMB4W/MMB4L, and could use 1 feature that is currently not available to ease the implementation a lot. I could use a OPTION CONSOLE ECHO ON/OFF The option is preferably volatile, to avoid confusion when someone uses it and afterwards wants to interact on commandline. Currently MMBasic on picomite echo's all characters send from keyboard to screen (when using Putty/Teraterm). So the picomite sends everything you send to it, back. For using the picomite as a serial IO block, it is a lot easier if it would not do this. Only output what you order it to print, and the acknowledging ">" prompt when in commandline mode. Not sure how deep this is burried in MMBasic. Main reason for asking this is that I want MMB4W to send commands to the picomite (either commandline, or to a running basic program) and the program completely autonomously could send data back (i.e. communicate an interrupt). These data streams (text) can interleave, and it is very hard to separate them later. You really have to analyze what you did send, and subtract that from the incomming message. Or maybe you see another way of doing this ? Regards, Volhout PicomiteVGA PETSCII ROBOTS |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7817 |
On my I2C expansion module design I included an open-collector interrupt line (yes, it's non-standard!) The idea is that no matter how many modules you have, if one triggers the interrupt then the host will read a fixed address on all the modules. A bit set indicates the cause of the interrupt. The host deals with it then resets the flag. That's the idea anyway. It's untested at the moment. :) I'm not sure about sending command line commands to the PicoMite. What happens if one doesn't do what's intended? The host has no control and the watchdog isn't running. Serial control over the COM port(s) is fine as error trapping works. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
thwill![]() Guru ![]() Joined: 16/09/2019 Location: United KingdomPosts: 4298 |
I'm reasonably certain a program running on the PicoMite using INKEY$ to read from the console does not echo what it receives. It does echo when using INPUT$ through. If you are looking for an elaborate example of MMBasic (MMB4L in this case) driving another 'mite over the USB console then I can point you at: https://github.com/thwill1000/cmm2-sptools/tree/master/src/gonzo I hadn't intended to "publish" yet as it's incomplete and I probably don't have time to support you, but *perhaps* it might be of interest if you're prepared to work for your gratification ![]() Best wishes, Tom MMBasic for Linux, Game*Mite, CMM2 Welcome Tape, Creaky old text adventures |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5021 |
I am not sure how to get an interrupt from picomite into a laptop, other than sending rs232 data. PicomiteVGA PETSCII ROBOTS |
||||
matherp Guru ![]() Joined: 11/12/2012 Location: United KingdomPosts: 10180 |
Correct - just write a little program that loops on inkey$, collects the characters until CR then do a switch on the received command |
||||
lizby Guru ![]() Joined: 17/05/2016 Location: United StatesPosts: 3347 |
It wouldn't hurt to use Geoff's I2C master/slave mechanism (repurposed as serial, CR delimited) as shown in the "I2C Communications" in the Getting Started With the Micromite manual, at least for setting up and using pin I/O. Then if the CMM2 EXECUTE command were available on the Picomite, serial strings beginning with, say "!" could be run with EXECUTE "command string". And other tokens could be enabled. PicoMite, Armmite F4, SensorKits, MMBasic Hardware, Games, etc. on fruitoftheshed |
||||
Mixtel90![]() Guru ![]() Joined: 05/10/2019 Location: United KingdomPosts: 7817 |
@ Volhout You can't actually do interrupts as such over RS232 as standard. You could use one of the control pins such as DTR but you'd have to have a custom handler in the host to cause that to trigger an interrupt - and it's another wire. The alternative is for the host to keep testing the RX buffer to see if there's anything there, but that's not an interrupt. I can't actually think of a way to reliably get an interrupt into a laptop on a standard system. I'm not sure if windows does such things, although linux might. Mick Zilog Inside! nascom.info for Nascom & Gemini Preliminary MMBasic docs & my PCB designs |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5021 |
All, Thanks for the idea's. I think it can be done, but not as I intended. The original idea was to attach a picomite, and use the commandline interface as if you where running on the picomite itself. The picomite needed only have MMBAsic. Example: a picomite program could blink a LED attached to pin1 Setpin 1,dout a=0 do pause 500 pin(1)=a a=1-a print a loop MMB4W would execute Serialsend "Setpin 1,dout" Serialsend "a=0" do pause 500 Serialsend "pin(1)=a" Serialsend "a=1-a" Serialsend "print a" Serialreceive a$ 'serial receive will receive until it finds the ">" prompt Print a$ loop So it is not going to be that simple. You need a program in the picomite that is tailor made for your application AND a program in the laptop that is tailormade for the application. You cannot simply (running your basic program) receive the string "Setpin 1,dout" and execute it. -or- The picomite needs a program that is universal and can do anything to any pin, and the protocol used to do anything to any pin must be developed. I think for Arduino something like that does already exist. I will try to find it, just can't remember what it was called. PicomiteVGA PETSCII ROBOTS |
||||
TassyJim![]() Guru ![]() Joined: 07/08/2011 Location: AustraliaPosts: 6266 |
MMBasic4W has the same interrupt capability as (most) other MMBasics. Just specify an interrupt in the serial initialisation. The program just has to work out what the data refers to when it gets there. Sometimes, polling is better but the interrupt method is available out of the box. Jim VK7JH MMedit |
||||
Volhout Guru ![]() Joined: 05/03/2018 Location: NetherlandsPosts: 5021 |
I will study your proposal. It may well fit on the serial port. PicomiteVGA PETSCII ROBOTS |
||||
![]() ![]() ![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |