Notes
Notes - notes.io |
sbit LCD_RS at RB4_bit;
sbit LCD_EN at RB5_bit;
sbit LCD_D4 at RB0_bit;
sbit LCD_D5 at RB1_bit;
sbit LCD_D6 at RB2_bit;
sbit LCD_D7 at RB3_bit;
sbit LCD_RS_Direction at TRISB4_bit;
sbit LCD_EN_Direction at TRISB5_bit;
sbit LCD_D4_Direction at TRISB0_bit;
sbit LCD_D5_Direction at TRISB1_bit;
sbit LCD_D6_Direction at TRISB2_bit;
sbit LCD_D7_Direction at TRISB3_bit;
unsigned sayma;
float frekans;
char cevir[6];
void interrupt()
{ if (CCP1IF) // Int. flag sorgulama
{
CCP1IF_bit = 0; // Int. flag reset
TMR1L=0; // Timer reset
TMR1H=0;
}
}
void main()
{
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
TRISB = 0x00;
TRISC.B2 = 1; // RC2 pini giriş (CCP1 input)
T1CON = 0x31; // 0b0010 0001
// Enable Timer1 , Internal Osc. Prescaler=1/ 4,
CCPR1L = 0x00;
CCPR1H = 0x00;
CCP1CON = 0x05; // 0b0000 0101
// CCP1 modül: tek yükselen kenar yakalama modu,
INTCON.GIE =1; // GIE : Tüm kesmeler için izin
INTCON.PEIE=1; // PEIE: kesme izin
CCP1IE_bit= 1; // CCP1: kesme izin
TMR1L = 0x00;
TMR1H = 0x00; // TMR1 register reset
while(1)
{
sayma=CCPR1H;
sayma=sayma<<8; // Ayrık 2x8 bit veriyi
sayma=sayma+CCPR1L; // değişkene aktarma
frekans=500000/Sayma; // frekans değerine çevirme
WordToStr(frekans, cevir); // frekans değerini
// karaktere çevirme
Lcd_Out(1,1,"f="); // LCD’ye “f=” yaz
Lcd_Out(1,4,cevir);
}
}
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team