EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Aux I/O not responding

Started by Taiwo August 2, 2013
Hello guys

I'm quite new to the Rabbit MCU. I have been trying to send some
messages to an OLED through the aux I/O pins, but none of the pins
associated with the Aux I/O are responsding (including /IORD and /IOWR).
I have macro definition at the start of the source file, amongst others.
Please what am I missing out in the source file.

Below is a brief description of my file.

#define PORTA_AUX_IO // Enable the external I/O bus

void SendToOLED(int addr, char value)
{
WrPortE(addr, NULL, value);
}
int main()
{
WrPortI(IB7CR, &IB7CRShadow, 0x4C); // Invert

// Ensure tht the 6-bit address external I/O bus is enabled
MsDelay(1000); // Wait for one second to allow OLED to reset
itself

SendToOLED(1, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
European font
SendToOLED(1, '\B00001100'); // Display On, Cursor Off, Non-Blinking
cursor
SendToOLED(1, '\B00000110'); // Increment and Non-shift Entire
Display
}

On 8/2/2013 10:07 AM, Taiwo wrote:
> Hello guys
>
> I'm quite new to the Rabbit MCU. I have been trying to send some
> messages to an OLED through the aux I/O pins, but none of the pins
> associated with the Aux I/O are responsding (including /IORD and /IOWR).
> I have macro definition at the start of the source file, amongst others.
> Please what am I missing out in the source file.
>
> Below is a brief description of my file.
>
> #define PORTA_AUX_IO // Enable the external I/O bus
>
> void SendToOLED(int addr, char value)
> {
> WrPortE(addr, NULL, value);
> }
> int main()
> {
> WrPortI(IB7CR, &IB7CRShadow, 0x4C); // Invert
>
> // Ensure tht the 6-bit address external I/O bus is enabled
> MsDelay(1000); // Wait for one second to allow OLED to reset
> itself
>
> SendToOLED(1, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
> European font
> SendToOLED(1, '\B00001100'); // Display On, Cursor Off, Non-Blinking
> cursor
> SendToOLED(1, '\B00000110'); // Increment and Non-shift Entire
> Display
> }

The address for the external I/O is:

PE0 - 0000-1FFF
PE1 - 2000-3FFF
... and so on...
PE6 - C000-DFFF
PE7 - E000-FFFF

So try:

void SendToOLED(int addr, char value)
{
WrPortE(addr+0xE000, NULL, value);
}
You will probably need to add checks to make sure the display is ready
to write to. Add a check for the ready bit in the display status
register before writing or you could just add delays if you can't read
the display.



--
------
Scott G. Henion, Consultant
Web site: http://SHDesigns.org
------

Did you enable port A?
 
 // Set port A as the I/O data bus & Port B as the I/O Address bus. WrPortI( SPCR, &SPCRShadow, 0x8C); // Enable I/O bank, 3 waitstates, chip select, permit write WrPortI(IB7CR, &IB7CRShadow, 0x88);// I/O Bank bit 7, port E, I/O strobe
 
>________________________________
> From: Taiwo
>To: r...
>Sent: Friday, August 2, 2013 7:07 AM
>Subject: [rabbit-semi] Aux I/O not responding
>

>Hello guys
>
>I'm quite new to the Rabbit MCU. I have been trying to send some
>messages to an OLED through the aux I/O pins, but none of the pins
>associated with the Aux I/O are responsding (including /IORD and /IOWR).
>I have macro definition at the start of the source file, amongst others.
>Please what am I missing out in the source file.
>
>Below is a brief description of my file.
>
>#define PORTA_AUX_IO // Enable the external I/O bus
>
>void SendToOLED(int addr, char value)
>{
>WrPortE(addr, NULL, value);
>}
>
>int main()
>{
>WrPortI(IB7CR, &IB7CRShadow, 0x4C); // Invert
>
>// Ensure tht the 6-bit address external I/O bus is enabled
>MsDelay(1000); // Wait for one second to allow OLED to reset
>itself
>
>SendToOLED(1, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
>European font
>SendToOLED(1, '\B00001100'); // Display On, Cursor Off, Non-Blinking
>cursor
>SendToOLED(1, '\B00000110'); // Increment and Non-shift Entire
>Display
>}
>
>
>
Hello Scott

Thanks for your reply. I have amended the SendToOLED function, but there
is still not response from the Rabbit. I am using the Digital I/O board
with the developemet kit, and I also have a MSO picoscope connected to
the required pins, but there is no response read by the picoscope.

If I may ask, how do you programme the RCM6700 up to carry out these
functions, because I have read the manuals, and even the Dynamic C10.72
does not recognise the IOPCR ad IBxER registers. Is there something I am
missing out? I'm just so confused sine there is no tutorial anywhere
(even YouTube) talking about the Rabbit microprocessor.

Thanks a lot, and look forward to your reply.

Taiwo.
--- In r..., Scott Henion wrote:
>
> On 8/2/2013 10:07 AM, Taiwo wrote:
> > Hello guys
> >
> > I'm quite new to the Rabbit MCU. I have been trying to send some
> > messages to an OLED through the aux I/O pins, but none of the pins
> > associated with the Aux I/O are responsding (including /IORD and
/IOWR).
> > I have macro definition at the start of the source file, amongst
others.
> > Please what am I missing out in the source file.
> >
> > Below is a brief description of my file.
> >
> >
> >
> > #define PORTA_AUX_IO // Enable the external I/O bus
> >
> > void SendToOLED(int addr, char value)
> > {
> > WrPortE(addr, NULL, value);
> > }
> >
> >
> > int main()
> > {
> > WrPortI(IB7CR, &IB7CRShadow, 0x4C); // Invert
> >
> > // Ensure tht the 6-bit address external I/O bus is enabled
> > MsDelay(1000); // Wait for one second to allow OLED to reset
> > itself
> >
> > SendToOLED(1, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
> > European font
> > SendToOLED(1, '\B00001100'); // Display On, Cursor Off, Non-Blinking
> > cursor
> > SendToOLED(1, '\B00000110'); // Increment and Non-shift Entire
> > Display
> > }
>
> The address for the external I/O is:
>
> PE0 - 0000-1FFF
> PE1 - 2000-3FFF
> ... and so on...
> PE6 - C000-DFFF
> PE7 - E000-FFFF
>
> So try:
>
> void SendToOLED(int addr, char value)
> {
> WrPortE(addr+0xE000, NULL, value);
> }
> You will probably need to add checks to make sure the display is ready
> to write to. Add a check for the ready bit in the display status
> register before writing or you could just add delays if you can't read
> the display.
>
> --
> ------
> Scott G. Henion, Consultant
> Web site: http://SHDesigns.org
> ------
>

Hello Steve

Thanks for your reply. I enabled Parallel Port A to serve as the
auxiliary I/O by defining the macro (PORTA_AUX_IO ) at the start of the
programme, and I have lso tried enabling it by writing the specified
bits to the SPCR register, but all to no avail. I will still keep
working on it.

Have a nice week ahead

Taiwo
--- In r..., Steve Trigero wrote:
>
> Did you enable port A?
> br /> > // Set port A as the I/O data bus & Port B as the I/O Address
bus. WrPortI( SPCR, &SPCRShadow, 0x8C); // Enable I/O bank, 3
waitstates, chip select, permit write WrPortI(IB7CR, &IB7CRShadow,
0x88);// I/O Bank bit 7, port E, I/O strobe
> br /> > >________________________________
> > From: Taiwo taiwo_ososanya@...
> >To: r...
> >Sent: Friday, August 2, 2013 7:07 AM
> >Subject: [rabbit-semi] Aux I/O not responding
> >
> >br /> > >
> >
> >Hello guys
> >
> >I'm quite new to the Rabbit MCU. I have been trying to send some
> >messages to an OLED through the aux I/O pins, but none of the pins
> >associated with the Aux I/O are responsding (including /IORD and
/IOWR).
> >I have macro definition at the start of the source file, amongst
others.
> >Please what am I missing out in the source file.
> >
> >Below is a brief description of my file.
> >
> >#define PORTA_AUX_IO // Enable the external I/O bus
> >
> >void SendToOLED(int addr, char value)
> >{
> >WrPortE(addr, NULL, value);
> >}
> >
> >int main()
> >{
> >WrPortI(IB7CR, &IB7CRShadow, 0x4C); // Invert
> >
> >// Ensure tht the 6-bit address external I/O bus is enabled
> >MsDelay(1000); // Wait for one second to allow OLED to reset
> >itself
> >
> >SendToOLED(1, '\B00111001'); // 8-bit, 2 line, 5x8 dots, Western
> >European font
> >SendToOLED(1, '\B00001100'); // Display On, Cursor Off, Non-Blinking
> >cursor
> >SendToOLED(1, '\B00000110'); // Increment and Non-shift Entire
> >Display
> >}
> >
> >
>

The 2024 Embedded Online Conference