У нас вы можете посмотреть бесплатно Real time clock & calendar with PIC18F4550 and DS3232 или скачать в максимальном доступном качестве, видео которое было загружено на ютуб. Для загрузки выберите вариант из формы ниже:
Если кнопки скачивания не
загрузились
НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием видео, пожалуйста напишите в поддержку по адресу внизу
страницы.
Спасибо за использование сервиса ClipSaver.ru
------------------------- 📌Introduction ------------------------- The DS3232 is a low cost , extremely accurate real time clock with a built-in crystal oscillator. The characteristics of the DS3232 make it one of the best choices for real time clock chips. This project shows how to build is simple real time clock and calendar (RTCC) using PIC18F4550 microcontroller and DS3232 The DS3232 uses I2C protocol to interface with the master device which is in our example the PIC18F4550 which has one I2C module. The I2C protocol uses only two lines: SCL (Serial Clock) and SDA (Serial Data) which are in the PIC18F4550 pin RB1 and pin RB0 respectively. ------------------------- 📌Circuit Design ------------------------- The 1602 LCD has 7 data lines which are connected to pins RD0~6, the DS3231 SCL pin is connected to pin RB1 (#34) and SDA is connected to pin RB0 (#33) of the PIC18F4550 microcontroller. In the circuit there are 2 push buttons (B1 & B2) connected to pin RB2 and pin RB3, the two push buttons are used to set the time as well as the calendar parameters (minutes, hours, date……). The button B1 selects the parameter and B2 increments the selected parameter. The 3V cell battery is used as a backup to keep time and date running in case of main power failure. The circuit can work without this battery but its pin (#14) has to be grounded. In this project the PIC18F4550 uses its internal oscillator and MCLR pin function is disabled. ------------------------- 📌 Tags ------------------------- #st7738 #dht22 #pic18f4550 ------------------------- 📌 The Code ------------------------- TThe C code below was tested with CCS C compiler version 5.051. The hardware I2C module of the PIC18F4550 is initialized and configured using the function below with a speed of 100KHz: #use I2C(master, I2C1, FAST = 100000) master: set the microcontroller to the master mode I2C1: use first I2C module. Code functions: void DS3231_display() : this function prints the time and calendar on the 1602 LCD screen. Before the print it converts the all the wanted data from BCD format to decimal format. int8 edit(parameter, x, y) : I used this function to edit time and calendar parameters. I used a variable named i to distinguish between the parameters: i = 0, 1 : hours and minutes respectively i = 2, 3, 4: date, month and year respectively. After the edit of time/calendar the data have to be converted back to BCD format and written to the DS3231 (it had been converted from BCD format to decimal format by the function void DS3231_display() ) void blink() : this small function works as a delay except that it is interrupted by the buttons B1 (connected to RB2) and B2 (connected to RB3). When called and without pressing any button the total time is 10 x 25ms = 250ms. With this function we can see the blinking of the selected parameter with a frequency of 2Hz. So a delay of 250ms comes after the print of the selected parameter and after that delay a 2 spaces is printed which makes the parameter disappears from the LCD and another 250ms delay comes after the print of the 2 spaces.Source Code give in comment section. 📌 Tune With us so you never miss any update ----------------------------------------------------------------------------------------------------------------------------------------------------------- 🏷️Telegram : https://t.me/electronicsdeveloper 🏷️Facebook : / electronicsdeveloper 🏷️Instagram : / electronics_developer 🏷️Tweeter : https://twitter.com/Electronics_Dev?s=09 🏷️LinkedIn : / electronics-with-shreyash 🏷️Pinterest : / electronics_developer Copyright Disclaimer under Section 107 of the copyright act 1976 ------------------------------------------------------------------------------------------------------------------------------------------------------------ Copyright Disclaimer under Section 107 of the copyright act 1976, allowance is made for fair use for purposes such as criticism, comment, news reporting, scholarship, and research. Fair use is a use permitted by copyright statute that might otherwise be infringing. Non-profit, educational or personal use tips the balance in favour of fair use. ----------------------------------------------------------------------------------------------------------------------------------------------------------- About Electronics Developer : YouTube certified creative essentials and asset monetization -----------------------------------------------------------------------------------------------------------------------------------------------------------