this post was submitted on 03 Aug 2023
8 points (90.0% liked)

Embedded

452 readers
1 users here now

This sub is dedicated to discussion and questions about embedded systems: "a controller programmed and controlled by a real-time operating system (RTOS) with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints."

founded 2 years ago
MODERATORS
 

I'm trying to run an LED matrix display (with a Max7219 controller) from a raspberry pi pico using rust. There is a max7219-crate that I used. But i am unsure about how to prepare the pins I want to use. Can I Use any of the pins? Do I have to set them to push-pull-output?

you are viewing a single comment's thread
view the rest of the comments
[–] Kalcifer 2 points 1 year ago* (last edited 1 year ago)

Yes, this community is stil alive.

I don't really have an exact answer to your question, as I don't write Rust, and I've never used a Raspberry Pi for electronics, but I have some educated input:

There is a max7219-crate that used. But i am unsure about how to prepare the pins want to use.

Presumably, the crate just exposes pre-defined config objects that you call in your code.

Can Use any of the pins?

From what I recall, no, you can't use any of the pins on the Raspberry Pi as generic IO (all this information that you are looking for is in the datasheets of the devices that you are using) -- some pins are dedicated for power, etc.

Do have to set them to push-pull-output?

Generally speaking, yes, if you want to use a generic I/O as an output, then you must configure it as such.