# external I/O

**URL:** <https://forums.digi.com/t/external-i-o/9506>\
**Category:** Rabbit\
**Created:** [February 6, 2007, 11:42am UTC](https://forums.digi.com/t/external-i-o/9506 "2007-02-06T11:42:00Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rabbitman](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rabbitman](https://forums.digi.com/u/rabbitman)\
**Post date:** [February 6, 2007, 11:42am UTC](https://forums.digi.com/t/external-i-o/9506/1 "2007-02-06T11:42:00Z")

</div>

hello,

i am dealing with the rcm3700. i am intrested in interfacing with external devices (peripherals devices like lcd).  
i have several questions:

1.i am using aux i/o. do i have to use port E bits as i/o strobe?

1. pin PE7 can be used as chip select. what in fact,is the meaning of this function? is it necessery for write/read activities with external i/o?

2. i tried using port E and couldn’t produce an IOWR (write) pulse,should i enable it, or configure it in some way? how do i get an IOWR pulse?

can someone please attach a brief example of writing to an extenal address (the whole configuration please).  
thanks.

---

<div class="post-metadata">

**Author:** ![bsprouse](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@bsprouse](https://forums.digi.com/u/bsprouse)\
**Post date:** [February 7, 2007, 12:43am UTC](https://forums.digi.com/t/external-i-o/9506/2 "2007-02-07T00:43:37Z")

</div>

1. You do not have to use Port E strobes if what you’re interfacing to does not require the /CS signal to go low before the start of the read or write cycle. You can use /IORD as your /CS signal if this is the case. Otherwise, you will need to enable at least one of the Port E pins to get the longer /CS cycle.

2. Any of the Port E pins can be used as I/O strobes, each one has an \*\*\*igned address range. See I/O Bank Control Registers in section 10 of the Rabbit 3000 User Manual for a complete explanation.

3. /IOWR and /IORD are separate signals available on the RCM3700 connector on pins 32 and 33 respectively.

/////////////////////////////////////////////////////////////////////////  
// Configure Port E  
/////////////////////////////////////////////////////////////////////////  
WrPortI(PECR, &PECRShadow, 0); // clear all bits to pclk/2  
WrPortI(PEFR, &PEFRShadow, 1); // PE0 is I/O /CS strobe  
WrPortI(PEDR, &PEDRShadow, 0xFF); // set all bits high  
WrPortI(PEDDR, &PEDDRShadow, 0xFF); // set all bits to output

// set up the external I/O control registers  
WrPortI(IB0CR, &IB0CRShadow, 0x88); // Setup PE0 to be CS w/ 3 waits  
WrPortI(SPCR, &SPCRShadow, 0x8C); // Enables AUX I/O

After this I/O writes to address 0 - 0x1FFF will read/write to the I/O bus

---

<div class="post-metadata">

**Author:** ![bsprouse](https://avatars.discourse-cdn.com/v4/letter/b/ecd19e/32.png) [@bsprouse](https://forums.digi.com/u/bsprouse)\
**Post date:** [February 7, 2007, 12:44am UTC](https://forums.digi.com/t/external-i-o/9506/3 "2007-02-07T00:44:58Z")

</div>

1. You do not have to use Port E strobes if what you’re interfacing to does not require the /CS signal to go low before the start of the read or write cycle. You can use /IORD as your /CS signal if this is the case. Otherwise, you will need to enable at least one of the Port E pins to get the longer /CS cycle.

2. Any of the Port E pins can be used as I/O strobes, each one has it’s own address range. See I/O Bank Control Registers in section 10 of the Rabbit 3000 User Manual for a complete explanation.

3. /IOWR and /IORD are separate signals available on the RCM3700 connector on pins 32 and 33 respectively.

/////////////////////////////////////////////////////////////////////////  
// Configure Port E  
/////////////////////////////////////////////////////////////////////////  
WrPortI(PECR, &PECRShadow, 0); // clear all bits to pclk/2  
WrPortI(PEFR, &PEFRShadow, 1); // PE0 is I/O /CS strobe  
WrPortI(PEDR, &PEDRShadow, 0xFF); // set all bits high  
WrPortI(PEDDR, &PEDDRShadow, 0xFF); // set all bits to output

// set up the external I/O control registers  
WrPortI(IB0CR, &IB0CRShadow, 0x88); // Setup PE0 to be CS w/ 3 waits  
WrPortI(SPCR, &SPCRShadow, 0x8C); // Enables AUX I/O

After this I/O writes to address 0 - 0x1FFF will read/write to the I/O bus

---

<div class="post-metadata">

**Author:** ![rabbitman](https://avatars.discourse-cdn.com/v4/letter/r/e79b87/32.png) [@rabbitman](https://forums.digi.com/u/rabbitman)\
**Post date:** [February 8, 2007, 11:51am UTC](https://forums.digi.com/t/external-i-o/9506/4 "2007-02-08T11:51:18Z")

</div>

thanks for your quick reply.  
but,what i still don’t see is why an IOWR signal is not  
generated by my software command wrporte to a peripheral device.  
what configurations (or proper commands) must i set in order to generate that signal?  
(if some configurations are necessery).  
thanks.

---

<div class="post-metadata">

**Author:** ![SeeCwriter](https://avatars.discourse-cdn.com/v4/letter/s/ea666f/32.png) [@SeeCwriter](https://forums.digi.com/u/SeeCwriter)\
**Post date:** [February 14, 2007, 10:13pm UTC](https://forums.digi.com/t/external-i-o/9506/5 "2007-02-14T22:13:31Z")

</div>

You have to have the following define at the top of your program.

#define PORTA\_AUX\_IO

---

<div class="post-metadata">

**Author:** ![jumako](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@jumako](https://forums.digi.com/u/jumako)\
**Post date:** [July 21, 2009, 10:02am UTC](https://forums.digi.com/t/external-i-o/9506/6 "2009-07-21T10:02:11Z")

</div>

I’m expanding the I/O digital capacity of a RCM3305 using a 74HCT14 and a mix of 74HCT375 and 74HCT244. Using PE7 as “Chip Select” I note there is no settling time between data bus set and PE7 assertion. Everything is made in the same cycle time. By programming the PE7 as “Read/Write strobe” I get about 15ns between data bus set and PE7 assertion. But this is still a too short time for the HCT family. The wait states you can set in IB7CR, allow only to have a longer low state of PE7. I need instead to have the high-low transition on PE7 after about 30-40ns.
