hi
i m working on eb506 module.
i want to write a simple program to print "hello" N times ......
N is a integer and will asked by program to user
this program will be complied to RCM3000 using Dynamic C version 9.52 and the output will
be seen on hypertrm of computer via eb506(bluetooth)
below is the program that will print hello world 10 times
#use a7eng_eb506.lib
#class auto
#define BAUD_RATE 9600L
void main()
{
auto int nCounter;
serFopen(BAUD_RATE);
a7_serFeb506Init();
// Connect to the remote device
serFputs("con 00:11:22:33:44:55\r");
a7_serFwaitForString("ACK\r", 0);
// Wait for the connection to be established and switch into data mode.
// When switching into data mode, a 300ms timeout is required to give the
// module enough time to make the change.
while(!BitRdPortI(PDDR, 4));
BitWrPortI(PDDR, &PDDRShadow, 1, 5);
a7_pauseMs(300);
printf("Connection established\n");
// Send "Hello World" ten times
for(nCounter = 0; nCounter < 10; nCounter++)
{
serFputs("Hello World\r");
a7_pauseMs(1000);
}
// Verify all data has been transmitted and switch to Command Mode
while(serFwrFree() != FOUTBUFSIZE);
BitWrPortI(PDDR, &PDDRShadow, 0, 5);
a7_serFwaitForString("\r>", 0);
// Disconnect from the remote device
serFputs("dis\r");
a7_serFwaitForString("\r>", 0);
serFclose();
}
------------------------------------

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