Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:32 22 Nov 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 : Fully portable USB Picomite with MMBasic.

     Page 2 of 2    
Author Message
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2129
Posted: 09:31pm 24 Jun 2024
Copy link to clipboard 
Print this post

In that case we may be chasing the wrong rabbit.
With the LCD disabled the Touch CS will also be disabled so if it drifts low the touch controller output T_DO will be enabled blocking MISO.
To test this set the T_CS Pico pin high when using VGA.
Same as earlier for LCD_CS, may as well set them both high.

If that works also add a pullup to T_CS.

I should have thought of this earlier as others have mentioned it but it didn't happen on mine.

PS.
  Quote  I'll have to open up the case to be able to press the boot button to reflash anyway,
The Boot button is only needed on a fresh Pico.
At the command prompt type:-

update firmware

and it does the same thing, so if if the pullups on both CS pins work you won't need to open it up.

Another option could be:-
Sub MM.StartUp
 Setpin LCD_CS, DOut
 Setpin T_CS, DOut
 Pin(LCD_CS) = 1
 Pin(T_CS) = 1
End Sub

Though you would need to transfer it via XModem as the SD card won't be available until it's loaded.
Edited 2024-06-25 10:39 by phil99
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 09:20am 25 Jun 2024
Copy link to clipboard 
Print this post

Hi Phil,
I've tried using the SetPin and Pin commands, but something strange is happening.
If I run the commands to set up the appropriate pins to hi, in my cast gp17 and gp14, I can check they are high, fine, then I run "files", which says no SD found, when I re check GP17 and GP14, they are now low???
Think I'll have to resort to a soldering iron again and I'll let you know.
Regards, Kevin.

PS, done a bit more experimenting, this time I've tried to "list" known files on the SD, and this is working, so I set up the two pins, then attempt to list a files from the SD and it works, list another that works, check the gpio pins, still high, so it appears to be a problem with the "List" command clearing my setup gpio pins.
At least I can now try soldering, wit a bit more confidence. :-)
Just found, if I subsequently do a "files" I get the error.
Error: A hard error occurred in the low level disk I/O layer.
and my gpio pins have been cleared again?
Edited 2024-06-25 19:41 by Bleep
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2129
Posted: 01:01pm 25 Jun 2024
Copy link to clipboard 
Print this post

Curiouser and curiouser, tried to replicate the problem but it won't misbehave.
Though I haven't  used the USB firmware, just standard LCD and VGA.

If setting the CS pins high isn't the answer adding pullups to the 2 CS pins may not be either, but there is only one way to be certain.

I can understand a hard error clearing the pins but how they changed state the first time is a puzzle. With LCD and touch not configured in the VGA options they should be regular GPIO.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 03:10pm 25 Jun 2024
Copy link to clipboard 
Print this post

Hi Phil,
I agree the "files" command shouldn't clear those GPIO, but anyway, your last theory was correct all now working both VGA & LCD I've done a lot of swapping between both and it's all now good, only slight problem is that apparently on the USB version "update firmware" has been removed, so I'm still back to pushing the button, maybe I'll drill a reset hole in the back of the box. :-(

To confirm, I have used a pull up resistor of 18k on the MISO and a pull up resistor of 8k2 on the touch CS line, I did try higher values for this, 10k worked but at 12k it stopped working again, so I decided 1 standard value down from 10k for margin.
I used 18k on MISO, because when I measured the resistor on the back of the LCD, which I can't see, it came out at 6k6 to 6k8, depending on which way I measured it, so 18k it was. :-)
Thank you for all of your help.
Regards Kevin.
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2129
Posted: 11:25pm 25 Jun 2024
Copy link to clipboard 
Print this post

  Quote  now working both VGA & LCD
Excellent news.
A long journey to eliminate one jumper!

To ensure the mods haven't affected anything else, in LCD mode test touch and "Save Image", "Blit" or "Print Pixel(x,y)".
Since reading back is the purpose of the diode/resistor mod you will want it to work.

Edit.
Better still a more informative 2 line colour counter.
> clear : option base 0 : dim string s(2)=(" blues"," greens"," reds") : dim integer a, b, c, d
> for a=0to 2:b=0:for c=0to 255:d=c<<a*8:pixel 9,9,d:if d=pixel(9,9)then:inc b:endif:next:?b;s(a):next
64 blues
64 greens
64 reds
>

Edited 2024-06-26 09:32 by phil99
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 10:29am 13 Nov 2024
Copy link to clipboard 
Print this post

Update,
I have now bought a 7" HDMI/VGA car monitor, I paid £19 all in for mine, it is advertised at 12V and comes with a USB to 12V converter, however I have found that internally it is all 5V, so I have removed the internal 12V to 5V converter, one cut track, one wire link, and can now run it directly from 5V, saving 2 lots of power conversion inefficiency. :-)
So I am now able to run my whole Picomite Portable, with a HDMI/VGA monitor, Raspberry Pi keyboard, with 3 port internal USB hub, and wireless mouse, or USB games controller.... all from the Portable internal battery. :-)
Now I'll have to build a 2350 version. :-)

 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4213
Posted: 10:48am 13 Nov 2024
Copy link to clipboard 
Print this post

Nice !!

You could even mount the unit on the VESA mount screws on the back of the monitor....

Volhout
PicomiteVGA PETSCII ROBOTS
 
javavi

Senior Member

Joined: 01/10/2023
Location: Ukraine
Posts: 194
Posted: 06:25pm 13 Nov 2024
Copy link to clipboard 
Print this post

  Bleep said  So I am now able to run my whole Picomite Portable, with a HDMI/VGA monitor, Raspberry Pi keyboard, with 3 port internal USB hub, and wireless mouse, or USB games controller.... all from the Portable internal battery. :-)
Now I'll have to build a 2350 version. :-)

Great, what a mobile kit!
Please tell me if the USB Hub built into this keyboard for HID devices connected there (mouse, joystick) works well with PicoMiteUSB? I just remember how earlier in other projects on Pico this built-in USB Hub did not work well with the TinyUSB library.
 
Bleep
Guru

Joined: 09/01/2022
Location: United Kingdom
Posts: 509
Posted: 10:09pm 13 Nov 2024
Copy link to clipboard 
Print this post

Hi Javavi,
Yes the Raspberry Pi keyboard USB hub works great, I obviously haven't been able to test every possible device, but mouse/wireless mouse, USB Wii controller etc.
Peter may have tested more, he originally recommended the Raspberry Pi keyboard. :-)
Stay safe, Kevin.
 
     Page 2 of 2    
Print this page


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

© JAQ Software 2024