Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 06:51 28 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 : Using the onboard led as statusled by changing the delay?

Author Message
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 02:15am 27 Jul 2023
Copy link to clipboard 
Print this post

Hi
@matherp : is it possible to change the delaytime for the o board led to become a visual status led without extra Hardware and pin?
Plasma
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6100
Posted: 03:39am 27 Jul 2023
Copy link to clipboard 
Print this post

Set OPTION HEARTBEAT OFF
then use pin(GP25) as a standard digital out
  Quote  Pin 43 or GP25 is also PWM4B. It is an output connected to the on-board LED.


Jim
VK7JH
MMedit   MMBasic Help
 
Plasmamac

Guru

Joined: 31/01/2019
Location: Germany
Posts: 554
Posted: 04:49am 27 Jul 2023
Copy link to clipboard 
Print this post

Thx Jim , i dunno if i ever read this information mfg
Plasma
 
Mixtel90

Guru

Joined: 05/10/2019
Location: United Kingdom
Posts: 6798
Posted: 07:33am 27 Jul 2023
Copy link to clipboard 
Print this post

You can have fun with that LED as it's directly connected to TP5 (the middle pad) under the Pico's PCB.

If you directly connect a Red LED from TP5 to GND it automatically takes over from the green one (it has to be red as it it has a lower forward voltage than green).

If you connect a 1K resistor from TP5 to the base of a NPN transistor then the transistor will turn on while the LED is lit. Useful if you are stuck for an output.

This one is slightly riskier, although GP25 has some protection. If you use
HEARTBEAT OFF
SETPIN GP25 DIN
then connect TP5 to 3V3 via a 1K resistor the LED will light and GP25 will read as 1. If you now short TP5 to GND with a contact or a turned-on NPN transistor then the LED will go out and GP25 will read as 0.
Mick

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


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

© JAQ Software 2024