MS_TIMER

Hi,

I’m new to Rabbit. My previous experience is Ti MSP430 using IAR workbench.
Microchip C16 in assembler, and Atmel AVR in assembler.

I’m using the RMC3700 module fitted to my own motherboard.

I’m slowly coming upto speed in the Dynamic C environment. But need some help with the following.

  1. I need to put some delays in my routines, varing from around 1 to 50mS. I’ve found a reference to a variable “MS_TIMER”. But can’t find information on the limits, how often does it roll over, is it always running.

  2. I’m using a LCD Module from Everbouguet MC1604B (16 char x 4 line)
    Is there any lib files or examples for a module like this on the Rabbit.

  3. Why doesn’t my programme automatically run when I reset the power?

Thanks in advance

Nick Price
England

Not sure about the all the variable information, but I use a function that I came across in the samples supplied by Rabbit to implement ms delay:


/********************************************************************
msDelay - delay some number of milliseconds
	input parameter: int number of milliseconds to delay
	return value: none
	errors: none
********************************************************************/
nodebug
void msDelay(unsigned int delay)
{
	auto unsigned long done_time;
	
	done_time = MS_TIMER + delay;
   while( (long) (MS_TIMER - done_time) < 0 );
} 

  1. There’s a sample program supplied called LCD_DEMO.C, under the JACKRAB folder in the samples folder that has all the neccesary functions to init an LCD. You will have to change some initialization commands (eg. the sample is for a 16x2 display etc.). All the pinouts are supplied in the sample, it only uses 4 data lines. You can copy those functions into your own library or something.

  2. The module is always in debug mode while the programming cable is plugged in after a reset, if you want to run your program after a reset you need to unplug the programming cable

hope this helps

Thanks for the reply.

MS_TIMER working fine.

JackRab example lcd_demo.c works fine with the Everbouguet MC1604B (4 x 16 characher LCD). Just small modifications for 8bit mode, and different io lines.

Thanks for the help.

Nick
England