| Deutsch English Français Italiano |
|
<slrnve6ic4.c2t.dan@djph.net> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Dan Purgert <dan@djph.net> Newsgroups: sci.electronics.design Subject: Re: port pins Date: Thu, 12 Sep 2024 20:05:24 -0000 (UTC) Organization: A noiseless patient Spider Lines: 41 Message-ID: <slrnve6ic4.c2t.dan@djph.net> References: <o6c1ej93onsiugcs1m0f6v6d6scff60rpi@4ax.com> Injection-Date: Thu, 12 Sep 2024 22:05:25 +0200 (CEST) Injection-Info: dont-email.me; posting-host="fec9c84c1b9be84d63d69a95501ca99e"; logging-data="439205"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19P9grRHaWLrqsOJci9aI/gkSbD5LjBp8g=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:KP29mR1mgFvobyAaY64eg6nCfSA= Bytes: 2084 On 2024-09-10, john larkin wrote: > Something I've wondered about: > > Suppose we have a c program running on some little uP, and it has some > integer variable value, 8 or 12 bits or something, and wants to drive > a parallel DAC off-chip. > > The msb...lsb bits of the variable obviously have to get to the right > pins of the DAC. > > So, in general, how does one pick the physical i/o port pins on the > uP, to get the order right? The PCB layout is easiest if we just wire > the DAC to the handiest port pins. I pick whichever I/O port is - free - close - not an absolute pain layout wise. On the PDIP-28 ATMegaX8's; this usually amounts to PortD, down the left-hand side (assume Pin1 is upper-left). There's only VCC/GND to contend with in the middle (7,8) and then potentially the oscillator on PB7,0 (9,10). If I'm using the internal oscillator, PortB is also viable (but it gets a bit weird, since the layout is 6,7,0,1,2,3,4,5 (pins 9,10,14-19)) > > One could test and bit-bang each bit and port individually, and then > strobe the DAC, but that's inelegant. Ow, yeah, that'd be painful. -- |_|O|_| |_|_|O| Github: https://github.com/dpurgert |O|O|O| PGP: DDAB 23FB 19FA 7D85 1CC1 E067 6D65 70E5 4CE7 2860