ya adak, i get what u mean. thank anyway for the great help. okie now i show u the previous work i done.it only can read 2 digit.
Code:
if(char_gen[(heartrate & 0xf0) >> 4]>4 || char_gen[(heartrate & 0xf00) >> 8]<2)
TXBUF0 = 92160/pulseperiod; // Transmit buffer
actually, it worked but the problem is that the board got a problem that TXBUF0 is a 8 bit so i can only read 2 digit. so anything mnore than 100 ,it will only take the last 2 digit. so i change the value to a hexadecimal so when the digit is more than 100 it will also be 2 digit. ya so it can read it than after that from the hexa than i will convert back to decimal again.
Code:
num = 92160/pulseperiod;
div1=16;
while ((num>0)&&(div1>0))
{ ctr--;
output[ctr]=dataset[(num%div1)];
num=num/div1;
}
for (int i=1; i>=0; i--)
output[i]=output[i+ctr];
TXBUF0 = output[1] + output[0];
so this is the latest 1 i put inside tghe heart rate board. but it seem like it only transmit out the 1st data only. after that it hang.