Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:53 02 Aug 2025 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 : PicoMite - Strange PIN behavior

Author Message
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 09:31pm 31 Dec 2021
Copy link to clipboard 
Print this post

Hi,
Happy New Year to you all.
I am struggling to understand some strange PIN output on my PicoMite (ver 5.0701).
I have cleared the Pico and loaded everything from scratch several times.
I'm running the following code via MMEdit v5 and have pin GP6 connected to pin GP7.
The connections are sound and not intermittent.
I can make/break the pin GP6 to GP7 connection.
I expect the print statement to show GP6 as '0' when it is broken and '1' when it is made.

It intermittently:
- fails to change from 0 to 1 and vice versa
- works properly
- starts with the wrong value even when started from a powerdown/up or re-load of the code.

Is it me or something else?

Cheers, Andrew



 'PinTest.BAS
 
 SETPIN GP6, DIN
 SETPIN GP7, DOUT : PIN(GP7)=1
 Do
   PRINT "GP6= ";PIN(GP6), "   GP7= "; PIN(GP7)
   PAUSE 1000
 LOOP
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6283
Posted: 09:39pm 31 Dec 2021
Copy link to clipboard 
Print this post

with the link between 6 and 7 broken, there would be a high impedance input on 6. That would be unstable.

Jim
VK7JH
MMedit
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 09:50pm 31 Dec 2021
Copy link to clipboard 
Print this post

Thanks Jim.
How then can I test if a pin is high or low?

(I'm trying here to to get I2C comms to a Laser Distance sensor (for a water tank) to work. I think it relies on a pin being held high and I want to test that it is.)

Cheers,

Andrew
 
phil99

Guru

Joined: 11/02/2018
Location: Australia
Posts: 2642
Posted: 10:11pm 31 Dec 2021
Copy link to clipboard 
Print this post

Hi Andrew,
Make your input pin analogue and put a 10k to Gnd and another 10k to 3.3V.
You can then see if the output pin is high, low or off.
 
Andrew_G
Guru

Joined: 18/10/2016
Location: Australia
Posts: 871
Posted: 10:14pm 31 Dec 2021
Copy link to clipboard 
Print this post

Thanks Phil.
Will do.

Andrew
 
Print this page


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

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025