Writing to Pins 0 and 1

Making your program work.
Post Reply
BobW
Posts: 11
Joined: Tue Jun 02, 2009 6:19 am

Writing to Pins 0 and 1

Post by BobW » Sat Jun 13, 2009 10:21 am

If I do write to Pin0 and/or Pin1 on my Bare Bones Board, and someone give me a concrete example of what bad might happen?

Could I make it so I would be unable to upload new programs to the board with my USB-BUB?

I am trying to drive a seven segment LED display, and it would be convenient to do this using Pins 0-6 or 1-7.
In this way I would be able to change all seven segments simultaneously, and with only a single line of code.

Thank you.

BobW
amateur, hobbiest, geezer

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Writing to Pins 0 and 1

Post by paul » Sat Jun 13, 2009 10:03 pm

BobW

The issue is mostly about convenience while downloading. You have to disconnect any low impedance load on the RX pin (0), so pull the wire out for downloading. I don't think the TX pin should matter, but you're going to lose the ability to debug easily, so you may have to save a couple different sketches to get it debugged on one, and then run on the other. The display should be a good debugging tool though. If you can't get the download to happen then disconnect the TX (1) pin too.

If you've got a sketch running that uses pins 0 & 1, you will probably have to push the reset button before uploading. This may take a couple of tries with different timing. Some other users have reported that it wasn't that painful.

Paul

BobW
Posts: 11
Joined: Tue Jun 02, 2009 6:19 am

Re: Writing to Pins 0 and 1

Post by BobW » Mon Jun 22, 2009 8:11 am

Thanks Paul.

I made a prototype using pins 1-7 to drive the seven segment lines and pins 8-13 to select the 6 decades (via PNP transistors sequentially powering the six common anodes). Seems to work just fine. Am able to upload (download) code revisions to the BBB without having to remove any wires or hit reset. It's GOOD !

In order to be able to handle more than six decades (without using A0-A5) I would need to do outboard decoding of binary data on pins 8 - 13.

To drive eight decades, I was thinking of using a CD4051 whose address input was taken from pins 8, 9, and 10. This would give me control over eight decades using three pins. Any thoughts on this?

Thanks.
BobW

paul
Site Admin
Posts: 735
Joined: Mon May 12, 2008 4:19 pm

Re: Writing to Pins 0 and 1

Post by paul » Wed Jun 24, 2009 10:44 pm

BobW,

Hey glad you got it going and I'm glad that the chip uploads with no fuss - I've developed a few things working with pins 0 & 1 and it's not such a big deal, but usually you do have to pull out wires to low impedance loads - I guess the base transistors were large enough so they weren't an issue.

I don't see any reason why your multiplex scheme won't work as long as the 4051 can sink enough current to satisfy your expectations for LED brightness. Don't forget your LED's are going to get 8 times dimmer, so you might want to lower the current limiting resistors on the LED's.

Paul

JamesReolf
Posts: 2
Joined: Wed May 17, 2017 12:13 am

Writing to Pins 0 and 1

Post by JamesReolf » Sat May 27, 2017 4:32 pm

Hi,
Has anyone seen the message "writing block page= 10=174" while flashing?
Do you know what this might mean and what the problem might be?
Thank you

Post Reply