ATMega ports / features - clarification

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256


I'm about on the brink of expanding past the point of "self-contained
widgets", and into using SPI / I2C / general serial over U(S)ART.

Just to make sure I'm understanding things properly, if we take a look
at the ATMega32u4 datasheet, it says it has

  - USB
  - 1x USART
  - 1x SPI

So, if I was going to use this for something, would it mean that I could
use all three of those features independently?  For example,
Communicating to the 32u4 over USB, while having it communicate to some
other chips doing other things via RS485?

Or is it that I can use USB OR USART OR SPI in a project?

Thanks!

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAl0t91sACgkQjhHd8xJ5
ooGEqgf/XSIh2EyVgys0EPYM6E87B1yq/+9IJ6Pke32k1ho+zMvs8o9h6luodG2i
btzOk6xcHcDrqtubGF/ywEdI3JVsmUuCs9RDhrQ+dXxvWcF7vFQN5wJ08AFIXXXO
GkdgaSrAJBpjIB3d1RLiebwAgApxQom7WY8WrZqa9pL3/m3XJJ0Ce7hh1LuWpqkg
XM6bZ2CAj1uF5G7o2bm8ylhO66DXwjajtJJpSYUECnWEgoe6JF7isropPa9SbHMp
tvJNw94EegzfCmEGjD3x6AZqTWzjBJ+EvHdUtgVnr485ucSq3s8ySB5hh0ilHCRG
N0Y6QLlqown8eSwuMiNucE1mepdP1Q==
=NKu+
-----END PGP SIGNATURE-----

--  
|_|O|_|  
|_|_|O| Github: https://github.com/dpurgert
We've slightly trimmed the long signature. Click to see the full one.
Re: ATMega ports / features - clarification
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--yXywy4Cc3KDdM4FcwygkcmYfUhLC313Ma
Content-Type: multipart/mixed; boundary="PkxLr12AGRAkGYNNtyMyyXTHCNmimbB60";
 protected-headers="v1"
Newsgroups: alt.microcontrollers.8bit
Subject: Re: ATMega ports / features - clarification

--PkxLr12AGRAkGYNNtyMyyXTHCNmimbB60
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding

Quoted text here. Click to load it
d


That is correct (but the data sheet has the last word)!

USB: D- and D+ are separate pins.
USART: RXD1 and TXD1 are special functions of port D bits 2 and 3
SPI: MISO, MOSI and SCK are special functions of port B bits 1, 2, and 3

So: yes, you can use all three independently and "at the same time".

(but: no, you couldn't use port D bits 2 and/or 3 together with the UART
and/or port B bits 1, 2, and/or 3 together with SPI).

Josef


--PkxLr12AGRAkGYNNtyMyyXTHCNmimbB60--

--yXywy4Cc3KDdM4FcwygkcmYfUhLC313Ma
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJdLtebAAoJEI6bsj2ds39FZYgP/jDCFg3H81jtEuF6b96cDByh
Ag7sVwoIUiBUJvN1KyRbf/qZrN2uRWKHPiWkMrvNRJYQH/nl38CVmp9M5fJYLdf7
BElr45GcaM6l3ym81QGygauusN5APVOC64a6/DjPejmUibU+mshwVSSTL4elQlDY
rWaU1fLLLtqnFpkuxwx3+7qFmcbIW2YKH5vSIlk59sFHVAtUJcToC1NuYXRHPfVM
Ic12t5o4BCjp5RIPxr4vB+/wQoH4H/07t6Ss2zsZpdIxflvJn3nupr+WybhN4Sz0
lcQgDsyz3541otuhpzxiJh189+nBxegHDiOrc177g+s31dHKn5fSZQtPlCoxwpGo
I1x7SidBy+BrPd/PVOn2TXTKji1aq5Oxmf4N+UpqkVV0b7hsYFT0BUbhFTzFXek+
aH3RPHx0VY1ukyoEEaGhM+a7BzfQDzyxSMokB2Q8GzDsA2ThHs8NwvZ/Ws7rk/qd
fhfjTcjqDILff21gEilc1OdUXp2mX0bCuSowianls1/CgfmteZUgXzeW9PUhGVZD
mfp9KLltcRFJrdEBUAUoe5caK7k8gpQoNIp5uL/7FytHBE5EbO8rCxJa0G0De6qv
KlhkbYduttBHv3cidN2B8q5Jl5z/3J1UpB02FgLerD/mpubRjta2FzLCqh+pH6zH
prCGSJuQ0/f8B47KDGXw
=0tH2
-----END PGP SIGNATURE-----

--yXywy4Cc3KDdM4FcwygkcmYfUhLC313Ma--

Re: ATMega ports / features - clarification
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Josef Moellers wrote:
Quoted text here. Click to load it

Yeah, my main confusion stems out of generally sticking to ATTiny x5
chips, which only have that "USI" port (so SPI OR TWI OR ...), as
opposed to the more feature-rich chips.

So, figured it better to ask, before making misinformed errors.

Thanks again!

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCAAdFiEEBcqaUD8uEzVNxUrujhHd8xJ5ooEFAl0vMFoACgkQjhHd8xJ5
ooGIHQf8DiuWlMs2X0wjWiGYNgvX8J4eIJyHQ6KopMOy3w1wW9Hn61LkPIb6iNqU
oX7V4cwvQX66nBnK8GDpdyYQdSAu9nBcVM525ImiSHdyfQwEnEnktoupm2dQEOkg
BgTECGmGP4V7Q/FrQLHoq9yn6NvHtJJekEt7v7S5VSS0+MxQIEXJl4VEpssOJ3cR
BjzUMmLPVQqsOf0G3jcqIixfuKlzskWxfqKI7LP7XpBnU35TviB0T6T+lZCYAv+2
D6x4vhHgz+y+yZxUu0sCPGUkABYfn4xfrYxzU6ioknqU0Znx4nPgmie7VJ/2enig
LkHH9s5h6juN4wl4MKmAoK0IWCKiKQ==
=mICz
-----END PGP SIGNATURE-----

--  
|_|O|_|  
|_|_|O| Github: https://github.com/dpurgert
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline