Mike Chambers
Well-known member
Hi, I'm looking for a pin to port mapping reference for the Teensy 3.6. Like, say I use this code:
PORTA = 0x80;
Which pins on the Teensy correlate to which bits on what the CPU considers to be port A?
I need to wire up a 512 KB parallel SRAM chip to gain access to more memory, and access must be very fast. Ideal code would be something like:
Where ports A, B, C connect to the address lines of the SRAM and port D connects to the data lines.
Thanks!
PORTA = 0x80;
Which pins on the Teensy correlate to which bits on what the CPU considers to be port A?
I need to wire up a 512 KB parallel SRAM chip to gain access to more memory, and access must be very fast. Ideal code would be something like:
Code:
void writeSRAM(uint32_t address, uint8_t value) {
PORTA = (uint8_t)address;
PORTB = (uint8_t)(address >> 8);
PORTC = (uint8_t)(address >> 16);
PORTD = value;
}
Where ports A, B, C connect to the address lines of the SRAM and port D connects to the data lines.
Thanks!