Skip to content

Instantly share code, notes, and snippets.

@jaytaph
Last active December 30, 2016 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaytaph/8d4b56ba47008398789ca8d2da4fe363 to your computer and use it in GitHub Desktop.
Save jaytaph/8d4b56ba47008398789ca8d2da4fe363 to your computer and use it in GitHub Desktop.
6526 tests
Ports A and B each consist of an 8-bit Peripheral
Data Register (PR) and an 8-bit Data Direction Register
(DDR).
If a bit in the DDR is set to the corresponding bit
in the PR is an output, if a DDR bit is set to a zero, the
corresponding PR bit is defined as an input.
On a READ, the PR reflects the information present on the
actual port pins (PA0-PA7, PBOPB7) for both input and
output bits.
Situatie 1:
PA0 0000 1111
Schrijf DDRA: 1101 0100 (1 = output, o = input)
Lees PRA: 0000 1111
Situatie 2:
PA0 0000 1111
Schrijf DDRA: 1101 0100 (1 = output, o = input)
Schrijf PRA: 0000 1111
naar PA0: 00?0 ?1??
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment