Last active
December 30, 2016 09:47
-
-
Save jaytaph/8d4b56ba47008398789ca8d2da4fe363 to your computer and use it in GitHub Desktop.
6526 tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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