#include <htc.h>
#include <stdio.h>
#include "usart.h"
#define _XTAL_FREQ 8000000
float temp [17];
float algos [17];
float temperatura = 2;
void inicializa_puertos (void)
{
TRISB =0x00; //Todo como salidas
init_comms();
}
void inicializa_ADC (void)
{
TRISB =0x00; //Todo como salidas
init_comms();
}
int puerto = 1;
void main (void)
{
inicializa_puertos();
while (1)
{
PORTB=puerto;
puerto=puerto*2;
if (puerto>128)
{
puerto=1;
}
printf("%f",temperatura);
_delay(1000000);
}
}
Memory Summary:
Program space used 1568h ( 5480) of 2000h words ( 66.9%)
Data space used E7h ( 231) of 170h bytes ( 62.8%)
EEPROM space used 0h ( 0) of 100h bytes ( 0.0%)
Configuration bits used 0h ( 0) of 2h words ( 0.0%)
ID Location space used 0h ( 0) of 4h bytes ( 0.0%)
Running this compiler in PRO mode, with Omniscient Code Generation enabled,
produces code which is typically 40% smaller than in Lite mode.
The HI-TECH C PRO compiler output for this "code could be 2140 words smaller."
See http://microchip.htsoft.com/portal/pic_pro for more information.