koolguy
Active Member
HI,
I am testing the sin function on simulator here is my code it is running but don't showing any value in PORTB register why???
I am testing the sin function on simulator here is my code it is running but don't showing any value in PORTB register why???
Code:
#include <htc.h>
#include <math.h>
#include <stdio.h>
__CONFIG(LVP_OFF & BOREN_OFF & PWRTE_ON & WDTE_OFF & FOSC_HS);
#define _XTAL_FREQ 20000000
void main (void){
TRISB=0x00;
{
int i, a;
while(1)
a = sin(20);
PORTB=a;
}
}