Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 658 → Rev 659

/programy/C/PIC/mereni/otmer/16F873/otmer.BAK
0,0 → 1,44
#include "D:\KAKLIK\programy\PIC_C\mereni\otmer\16F873\otmer.h"
 
//Definice portu: // Datovy port displeje pripojeny na 4 bity za sebou na jeden port
 
#define LCD_RS PIN_B1 // rizeni registru LCD displeje
#define LCD_E PIN_B0 // enable LCD displeje
#define LCD_DATA_LSB PIN_C4 // pripojeni LSB bitu datoveho portu LCD displeje (celkem 4 bity vzestupne za sebou)
 
#include "LCD.C"
 
#define DATA PIN_A1
#define CP PIN_A0
#define STROBE PIN_A2
 
#include "C:\library\kaklik\ccs\shift_reg.c"
 
void main()
{
unsigned int16 otacky;
 
setup_adc_ports(NO_ANALOGS);
setup_adc(ADC_OFF);
setup_spi(FALSE);
setup_timer_0(RTCC_EXT_H_TO_L|RTCC_DIV_1);
setup_timer_1(T1_EXTERNAL|T1_DIV_BY_2);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_PWM);
setup_ccp2(CCP_OFF);
 
lcd_init();
 
while (true)
{
set_timer1(0);
 
Delay_ms(500);
otacky=get_timer1();
otacky=otacky*40;
 
LCD_gotoxy(2,2);
printf(lcd_putc,"otacky:%lu ot/min ",otacky);
}
 
}