I’m trying to figure out where to hook up a second SPI device, and I’m unsure what ports are available. Could someone please give me a hint as to what is connected where?
Port A:
Port B:
Port C: several serial ports
Port D: Switches and LEDs
Port E: external interrupt
Port F: PWM
Port G:
Port C has 4 serial ports available that can do SPI, but 2 of these are in use by the core module. Serial Ports A and B are used for programming and the onboard ADC respectively. Serial Ports C and D can both do SPI and are available on the following module pins on a RCM3400:
Port C: Tx on PC2 (Pin 17), Rx on PC3 (Pin 20) and Clk on PF1 (Pin 2)
Port D: Tx on PC0 (Pin 19), Rx on PC1 (Pin 22) and Clk on PF0 (Pin 4)
[QUOTE=Mr Burns;18]I’m trying to figure out where to hook up a second SPI device, and I’m unsure what ports are available. Could someone please give me a hint as to what is connected where?
Port A:
Port B:
Port C: several serial ports
Port D: Switches and LEDs
Port E: external interrupt
Port F: PWM
Port G:[/quote]
Thanks!
After digging trough BrdInit() I found out how the ADC is connected as well. Do the programming port use some kind of CS signal as well? I guess the RS-232 use the serial port D, so I’m left with serial port C to play with.
Serial Port A: Programming port
TxA: PC7
RxA: PC6
ClkA: PB1
Serial Port B: ADC
TxB: PC4 CS: PD2
RxB: PC5 Busy: PD1
ClkB: PB0
Serial port C:
TxC: PC2
RxC: PC3
Clk: PF1
Serial Port D: RS-232
TxD: PC0
RxD: PC1
Clk: PF0 (Unused for RS-232)
The question is will there be any complications to using
two serial ports for SPI when using standard libraries?
–
Henning
OK, I think I found out everything I need to know about what goes where… The brdInit() lists all ports, like this:
Port Function I/O I/O State
==== =========================== ====== ===========================================
PA0 External I/O data, ID0 Output High
PA1 External I/O data, ID1 Output High
PA2 External I/O data, ID2 Output High
PA3 External I/O data, ID3 Output High
PA4 External I/O data, ID4 Output High
PA5 External I/O data, ID5 Output High
PA6 External I/O data, ID6 Output High
PA7 External I/O data, ID7 Output High
PB0 ADC CLK Output High (SCLKB set by driver)
PB1 Programming port - CLKA Output High when not driven by CLKA
PB2 External I/O address, IA0 Output High
PB3 External I/O address, IA1 Output High
PB4 External I/O address, IA2 Output High
PB5 External I/O address, IA3 Output High
PB6 Not used, IA4 Output High
PB7 External I/O address, IA5 Output High selects LCD, low selects ethernet (PE6)
PC0 TXD - RS232 Output High (serial set by serial drivers)
PC1 RXD - RS232 Input Pulled-up core (serial set by serial drivers)
PC2 TXC - RS232 Output High (serial set by serial drivers)
PC3 RXC - RS232 Input Pulled-up core (serial set by serial drivers)
PC4 TXB - ADC SDI Output High (serial set by ADC driver)
PC5 RXB - ADC SDO Input Pulled-up core (serial set by ADC driver)
PC6 TXA - Programming port Output High when not driven
PC7 RXA - Programming port Input Pulled-up on core when not driven
PD0 RS485 transmit enable Output Low (disabled)
PD1 ADC Busy line Input Low (ADC device driven)
PD2 ADC device select Output High (active low)
PD3 Not used Input Pulled-up core
PD4 Switch S3 (normally open) Input Pulled-up
PD5 Switch S2 (normally open Input Pulled-up
PD6 LED DS1 Output High (off)
PD7 LED DS2 Output High (off)
PE0 Ethernet - INTR0 Output High
PE1 Not used Input Pulled-up protoboard
PE2 External I/O Strobe, ethernet Output High when not driven by ethernet
PE3 Not used Input Pulled-up core
PE4 Infrared - MIR_SEL Output Low selects slow (<= 115200)
PE5 Not used Input Pulled-up protoboard
PE6 External I/O Strobe, LCD Output High when not driven by LCD/Keypad
PE7 Not used Input Pulled-up protoboard
PF0 Not used Input Pulled-up protoboard
PF1 Not used Input Pulled-up protoboard
PF2 Not used Input Pulled-up core
PF3 Not used Input Pulled-up core
PF4 Not used Input Pulled-up protoboard
PF5 Not used Input Pulled-up protoboard
PF6 Not used Input Pulled-up protoboard
PF7 Not used Input Pulled-up protoboard
PG0 Not used Input Pulled-up protoboard
PG1 Ethernet - RESET Output High (active low)
PG2 TXF - Infrared Output High
PG3 RXF - Infrared Input Pulled-up protoboard
PG4 Infrared - MD1 Input Pulled-down protoboard
PG5 Infrared - MD0 Input Pulled-up protoboard
PG6 TXE - RS485 Output High (serial set by serial drivers)
PG7 RXE - RS485 Input Pulled-up (serial set by serial drivers)
But the question is, will there be any complications to using
two serial ports for SPI when using standard libraries?
No, you should not have a problem. The onboard devices run through their own drivers and do not use the SPI library. Post again if you still have problems.
There are two issues with using port A. The first is that port A is the port that Dynamic C uses to both programming and debug through. This means if you use port A for communications, you must download your code and disconnect, no debugging session will be available to you once your code starts running. This can be a very difficult situation to work with.
The other issue is that on any of our development boards or SBC’s, port A will not be tied to any drivers so you would need to wire up your own RS485 drivers to port A. If there is any way to use any of the other 5 serial ports on the Rabbit for your communications it would make your development far easier.