Terminal is the great tool, but sometimes I want nice gui. I decided to start learning C++ Builder and made simple tool for led switching on my devboard with help RS232.
Goal: To get temperature data from DS18b20 sensor
What we have: PIC16f628a, DS18b20, MAX232 level converter, devboard, proteus.
There is example of working with one DS18b20 at line, and you can find some useful functions for work with 1-wire protocol.
I’ve received some RTC ICs from aliexpress and I started investigations. Warning! Here I’m going to work only with time, not date.
Goals: Read/write time from DS1307 and pushing it to pc by uart.
What we have: PIC16f628a, DS1307, MAX232 level converter, devboard, proteus.
Lets look at USART module in pic microcontroller (uart module).
I’m going to move by two ways:
1. Using existing functions from hi-tech compiler.
2. Writing my own functions.
I choose software realization of I2C protocol as the next experiment. There isn’t description of this protocol, only realization, google has a lot information of i2c 🙂
Goal: To make connection between PIC16f628a and IO port expander PCA9539 by i2c
What we have: PIC16f628a, PCA9539, devboard.
Goal: To write and read EEPROM
What we have: PIC16f628a and simple devboard.
Microcontroller PIC16f628a has 128 bytes of EEPROM memory on board, not too much but we have what we have. Hi-tech PICC compiler has internal functions for work with EEPROM, but here I’m going to make some my personal functions.
Let’s look at the EECON1 register: