Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 12:25 26 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 : RP2040 Geek

     Page 3 of 3    
Author Message
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 10:31am 12 Feb 2024
Copy link to clipboard 
Print this post

I have been following the RP2040GEEK thread with interest - so I snagged one from The PIHut (£9.80).

Now my needs are "simple" - tinkering, simple sensors, displays and re-acquainting myself with BASIC, so the limited GPIO breakout is not an issue for me.

I must say "wow" for the price and ease of use I am impressed.

Coupled with MMEdit a near as damn it plug in and code solution that "just worked".

Love the additions to "Life" - the "once alive" addition is a nice touch.



Tinkering with this today around the day job (endless Teams meetings) - but bravo all round.
 
Volhout
Guru

Joined: 05/03/2018
Location: Netherlands
Posts: 4233
Posted: 10:55am 12 Feb 2024
Copy link to clipboard 
Print this post

As for GPIO,

I check dimensions, and currently there are 2x3 and 1x4 connectors with 1mm pitch.
This connector below fits at the footprint of the current connectors, and has 8 more pins (18 total). We need 4 (GP0,GP1 and GP26/GP27) to make it better match MMBasic.

The 4 wires fot these signals will be difficult to wire inside the housing, but I will make a try once I receive the sample connector.

And of coarse, you need the mating part also, preferably with longer wires. That is the next challenge...

Volhout



P.S. the drawing is a family drawing and does not show the actual 18 pin part.
Edited 2024-02-12 20:57 by Volhout
PicomiteVGA PETSCII ROBOTS
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 06:44pm 12 Feb 2024
Copy link to clipboard 
Print this post

  PEnthymeme said  
Coupled with MMEdit a near as damn it plug in and code solution that "just worked".

I found getting existing picomite adc to work impossible. The gpio is not like the rpi 2040 0.96 screen (see previous explanations).
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 07:33pm 12 Feb 2024
Copy link to clipboard 
Print this post

Not sure if I am missing something (quite possible) - but ADC via GP28 and GP29 -- just works as expected.

Sensing LDR readings on both 28 and 29 as I type.

P
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 07:33pm 12 Feb 2024
Copy link to clipboard 
Print this post

The ADC is identical - it's just that GP26 and GP27 (ADC0 and ADC1) are hidden from you so you can't connect anything to them. You just have to work around that by changing your program.

Also you MUST use GPn numbers and not PicoMite pin numbers 1-40. Those won't work on the Geek.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 08:00pm 12 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  The ADC is identical - it's just that GP26 and GP27 (ADC0 and ADC1) are hidden from you so you can't connect anything to them. You just have to work around that by changing your program.

Also you MUST use GPn numbers and not PicoMite pin numbers 1-40. Those won't work on the Geek.


Yea - worked out the GPn number part by trial and error.

But GP28/9 work fine.


The "quality" of connection (ie the ultra thin 1mm at best male leads barely connect to breadboard) so even the slightest "wiggle" breaks the circuit --- plus my ultra cheap breadboards dont help.  But it works.

Px
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 08:05pm 12 Feb 2024
Copy link to clipboard 
Print this post

Hi Mick. I'm still confused about rpigeek as to compatibility with my other picomites including the rpi2040 0.96" 160x80.
I had no luck with gp28 and gp29 but you said get 3 samples and use just one.
How PEnthymeme got it to work?
I've left the geek for now, testing usb keyboard with wireless micro kb and dongle vga and lcd.  
"The ADC is identical - it's just that GP26 and GP27 (ADC0 and ADC1) are hidden from you so you can't connect anything to them. You just have to work around that by changing your program."
I don't get that. If they're hidden means they are other pins?
option pico off?
PEnthymeme said"  Yea - worked out the GPn number part by trial and error." ??
Edited 2024-02-13 06:28 by stanleyella
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 08:15pm 12 Feb 2024
Copy link to clipboard 
Print this post

  stanleyella said  
How PEnthymeme got it to work?


Nothing clever --

SETPIN GP29, AIN

DO
  PRINT PIN(GP29)
LOOP


Displays the value across an LDR in series with a resistor.

Works as expected.

However, there is an interesting and "odd" behaviour which is repeatable.  If you SETPIN GP28, AIN and SETPIN GP29, AIN but only wire up one of the pins for input - then the connected pin doesnt read properly - either "floats" random from high to low or stays high all the time.  Not an issue of course as why define a pin for input and leave it floating, but nevertheless it caught me out.

Moral - dont leave input pins floating.

Px
Edited 2024-02-13 06:16 by PEnthymeme
 
PEnthymeme

Regular Member

Joined: 27/12/2023
Location: United Kingdom
Posts: 42
Posted: 08:18pm 12 Feb 2024
Copy link to clipboard 
Print this post

  stanleyella said  
"The ADC is identical - it's just that GP26 and GP27 (ADC0 and ADC1) are hidden from you so you can't connect anything to them. You just have to work around that by changing your program."
I don't get that. If they're hidden means they are other pins?
option pico off?


"Hidden" as in they are not broken out to a connector - the traces on the PCB are there, just not connected to the outside world -- physically hidden.

P
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 08:23pm 12 Feb 2024
Copy link to clipboard 
Print this post

As far as you are concerned, Stan, there are no GP26 and GP27 pins. You won't get an error if you try to use them (MMBasic thinks they are still usable), but they are connected to thin air so are of no use.
You can't re-allocate them, and you can't re-allocate ADC0 and ACD1. Consequently you just have to use GP27 (ADC2) and GP29 (ADC3) as those are the only ADC pins that come out to a connector.
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 09:22pm 12 Feb 2024
Copy link to clipboard 
Print this post

I tried SETPIN GP29, AIn that I thought I'd used first but not allowed/error. working scope, gp29 lead


OPTION EXPLICIT
oPTION DEFAULT NONE
option autorun on
 'SetPin GP28,pwm1A 'this optional test signal comment out
 'PWM 1,10000,50  'square wave ,this optional test signal comment out
 dim c%,x%,samples!(480)
 SETPIN GP29, AIn
 adc open 50000,3
 FRAMEBUFFER CREATE F
 FRAMEBUFFER LAYER L
 FRAMEBUFFER WRITE L
 line 0,mm.vres/2,mm.hres,mm.vres/2,,rgb(blue)
 line mm.hres/2,0,mm.hres/2,mm.vres,,rgb(blue) 'draw cross to layer L
 FRAMEBUFFER WRITE F
 do
   adc start samples!() 'get new samples
   'trigger
   c%=0
  do:If samples!(c%) > 0.1 then if samples!(c%+1) < 0.2 then exit do
inc c%:loop while c%<160

math scale samples!(),239/3.3,samples!()'scale to 80 pixel height
FRAMEBUFFER COPY L,F
for x%=0 to 238 'screen width
     line x%,samples!(x%+c%),x%+1,samples!(x%+1+c%),,rgb(green) 'draw new sample from sample(c%)
next x%
FRAMEBUFFER COPY F,N
loop


 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6787
Posted: 09:38pm 12 Feb 2024
Copy link to clipboard 
Print this post

Ah....  :)
Mick

Zilog Inside! nascom.info for Nascom & Gemini
Preliminary MMBasic docs & my PCB designs
 
stanleyella

Guru

Joined: 25/06/2022
Location: United Kingdom
Posts: 2129
Posted: 10:27pm 12 Feb 2024
Copy link to clipboard 
Print this post

  Mixtel90 said  Ah....  :)

This version of picomite hardware  ARGGGH!.
The ads are honest , I thought it was something else, my fault.
Volhout wants to redesign it,solder sockets.. "the hidden pins".
see what happens. I've never used a debugger.
 
     Page 3 of 3    
Print this page


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

© JAQ Software 2024