Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

Discussion Groups | Rabbit-Semi | RCM4010 Serial C Ooutput

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

RCM4010 Serial C Ooutput - whmeade2008 - Mar 27 2:41:28 2008

I am trying to transmit a simple string out serial port C on the
RCM4010 DEV board. I am using DC v10.21. I am new to Dynamic C but
have programmed for years in PICC for PIC chips. The output is going
to a studio window that pops up instead of showing up in the
HyperTerminal window on my PC through COM1. I am sure there is
something very simple I am over looking. My code is below.

/* Simple program to transmit "Hello WOrld out of port C via RS-232*/

void BoardInit();
void ClockCheck();
void SetupSerial();
#define CINBUFSIZE 511
#define COUTBUFSIZE 511
#define SERC_TXPORT PCDR
#define CDRIVE_TXD 2
#define SERC_RXPORT PCDR
#define CDRIVE_RXD 3

main()
{
BoardInit();

// Ensure serial ports C write buffers are empty at this point
serCwrFlush();

// Transmit an ASCII string over serial port C
printf("Hello World");

while(1);
}

void ClockCheck()
{
if (freq_divider != 96) // 58.98 MHz, not doubled
{
exception(-ERR_LIBCLOCKSPEED);
}
}

void SetupSerial()
{
serCopen(9600L);
}

void BoardInit()
{
ClockCheck();
// The following differ from BIOS settings
SetupSerial();
WrPortI(PCFR,&PCFRShadow,0x44); // Serial Port C
}
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )