Become a leader in the IoT community!

New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!

Step 1 of 5

CREATE YOUR PROFILE *Required

OR
Step 2 of 5

WHAT BRINGS YOU TO DEVHEADS? *Choose 1 or more

Collaboration & Work 🤝
Learn & Grow 📚
Contribute Experience & Expertise 🔧
Step 3 of 5

WHAT'S YOUR INTEREST OR EXPERTISE? *Choose 1 or more

Hardware & Design 💡
Embedded Software 💻
Edge Networking
Step 4 of 5

Personalize your profile

Step 5 of 5

Read & agree to our COMMUNITY RULES

  1. We want this server to be a welcoming space! Treat everyone with respect. Absolutely no harassment, witch hunting, sexism, racism, or hate speech will be tolerated.
  2. If you see something against the rules or something that makes you feel unsafe, let staff know by messaging @admin in the "support-tickets" tab in the Live DevChat menu.
  3. No age-restricted, obscene or NSFW content. This includes text, images, or links featuring nudity, sex, hard violence, or other graphically disturbing content.
  4. No spam. This includes DMing fellow members.
  5. You must be over the age of 18 years old to participate in our community.
  6. Our community uses Answer Overflow to index content on the web. By posting in this channel your messages will be indexed on the worldwide web to help others find answers.
  7. You agree to our Terms of Service (https://www.devheads.io/terms-of-service/) and Privacy Policy (https://www.devheads.io/privacy-policy)
By clicking "Finish", you have read and agreed to the our Terms of Service and Privacy Policy.

Can I Use a Single Pin as Both Rx and Tx on an ATtiny85 for Software Serial?

Related question: I’ll likely use an ATtiny85 for this project, meaning limited IO pins (WIP schematic pictured). I’ll mostly be listening for signals with a software serial Rx pin, but would be nice to be able to use Tx periodically.

Is is possible to refine a single pin to use it as both Rx and Tx (though not at the same time)? Per some previous Arduino code – https://github.com/JeremySCook/arduino-experiments/blob/main/MIDI/1-inch-MIDI/2-inch-midi.ino – I was able to set the Rx as the reset pin, which doesn’t really function the way I set things up, so maybe it’s possible. OTOH, SoftwareSerial is defined there outside of the setup function there, so I’m not sure if you can change this dynamically.
file0.jpg

  1. JeremyCook#0000

    Alright, here’s what I’ve come up with so far.
    Images: Mecanical CAD, schematic, PCB design, PCB 3D Model.

    Was hoping to not have a power switch and just use the reset pin to activate the ATtiny microcontroller, but I’m using an OLED which draws ~5mA when power is applied and nothing is lit up.

    Using separate pins as Rx and Tx. Open to any suggestins!
    0image.png1image.png2Screenshot_2024-10-17_at_8.27.12_AM.png3image.png

  2. JeremyCook#0000

    Got my device on order with JLCPCB. It will come with most of the SMD devices soldered on, 5 of these boards, for less than $50 including shipping (using a few cupons that came up). Assuming it comes back as I’d hope an expect that is an incredibly good price and will save me a ton of assembly time (though setting things up did take some time).

    While they’ve offered, I am not sponsored by JLCPCB, but have been by other board manufacturers. My gut feeling so far is that JLCPCB has the most to offer from what I’ve seen.

    They didn’t have the buffer I wanted available, so I also included a solder bridge that I can connect as needed. Per some previous comments, I think it will work without it. A good design change IMO. I am excited to see how this works out!
    0Screenshot_2024-10-18_at_8.31.19_AM.png

  3. JeremyCook#0000

    My first try came back with a question about the opto-isolator orientation (the big black component toward the upper-right on the design). Turned out it looks like I’d made a mistake mirroring the symbol in the schematic, which doesn’t really work once you get to the PCB stage as you can’t actually mirror a component in real life.

    Was an inconvenience to correct, HOWEVER, it also gave me an opportunity to move the aux pins to the upper-left, and add a screw hole to help secure add-ons and/or for mounting.

    I guess the lesson is take advantage of opportunities when they come and/or wait a day or two before actually ordering your PCB/PCBA!
    0Screenshot_2024-10-18_at_9.57.06_PM.png1Screenshot_2024-10-19_at_8.51.24_AM.png

CONTRIBUTE TO THIS THREAD

Leaderboard

RANKED BY XP

All time
  • 1.
    Avatar
    @Nayel115
    1620 XP
  • 2.
    Avatar
    @UcGee
    650 XP
  • 3.
    Avatar
    @melta101
    600 XP
  • 4.
    Avatar
    @lifegochi
    250 XP
  • 5.
    Avatar
    @Youuce
    180 XP
  • 6.
    Avatar
    @hemalchevli
    170 XP