A microcontroller-based embedded system project featuring real-time monitoring, alarm management, and multi-language support using the PIC18F4550 microcontroller.
This project implements a comprehensive board bring-up system that combines multiple peripherals and sensors to create a monitoring and control system. The system features a state machine-based architecture with real-time clock functionality, analog sensor monitoring, alarm management, and a user-friendly LCD interface.
- Real-Time Clock (RTC): DS1307-based timekeeping with hour, minute, and second setting
- Analog Monitoring: ADC-based sensor reading with configurable alarm thresholds
- Alarm System: Dual-level alarm monitoring (high/low thresholds) with visual indicators
- Multi-Language Support: Interface available in 6 different languages
- State Machine Architecture: Robust navigation system between different operational modes
- LCD Display: 16-character display for system information and menus
- LED Control: Visual feedback and alarm indication system
- Button Interface: Navigation and parameter adjustment controls
- I2C Communication: For RTC and DAC communication
- PWM Output: Pulse width modulation for analog output control
- Serial Communication: UART interface for debugging and external communication
- DAC Output: MCP4725-based digital-to-analog conversion
- Menu: Main navigation interface
- Alarm Configuration: Set high and low alarm thresholds
- Language Selection: Choose from 6 available languages
- Time Setting: Configure hours, minutes, and seconds
- Warning Mode: Alert state when alarm conditions are triggered
- PIC18F4550 microcontroller
- 20 MHz crystal oscillator
- Power supply and basic support components
- DS1307 Real-Time Clock module
- MCP4725 Digital-to-Analog Converter
- 16x2 LCD Display with HD44780 controller
- LEDs for status indication
- Push buttons for user interface
- Analog sensor (connected to ADC channel 0)
- MPLAB X IDE or compatible PIC development environment
- XC8 compiler for PIC18 family
- Programmer/debugger (PICkit, ICD, etc.)
Board_Bring-Up/
├── src/
│ ├── main.c # Main application entry point
│ └── code/
│ ├── ADC.c # Analog-to-Digital Converter functions
│ ├── button.c # Button handling and debouncing
│ ├── DAC_MCP4725.c # MCP4725 DAC communication
│ ├── delay.c # Timing and delay functions
│ ├── event.c # Event handling and system events
│ ├── I2C.c # I2C communication protocol
│ ├── LCD.c # LCD display control functions
│ ├── LED.c # LED control and patterns
│ ├── output.c # Output formatting and display
│ ├── PWM.c # Pulse Width Modulation control
│ ├── RTC_DS1307.c # Real-Time Clock functions
│ ├── serial.c # UART serial communication
│ ├── stateMachine.c # Main state machine implementation
│ ├── variables.c # Global variable management
│ └── headers/ # Header files for all modules
├── hardware/ # KiCad PCB design files
├── diagrams/ # System architecture diagrams
└── docs/ # Project documentation
- MPLAB X IDE installed
- XC8 compiler for PIC18 family
- PIC programmer/debugger
- Assembled hardware board or prototyping setup
-
Clone this repository:
git clone https://github.com/your-username/Board_Bring-Up.git cd Board_Bring-Up -
Open the project in MPLAB X IDE
-
Configure the project settings:
- Select PIC18F4550 as target device
- Set XC8 as the compiler
- Configure programmer/debugger
-
Build the project:
- Click "Build" or use Ctrl+F11
- Resolve any compilation errors
-
Program the microcontroller:
- Connect your programmer
- Click "Make and Program Device"
- Connect the LCD display to PORTD and control pins (RA2, RA3)
- Wire the DS1307 RTC to the I2C bus (RC3/SCL, RC4/SDA)
- Connect analog sensor to AN0 (RA0)
- Wire push buttons for navigation
- Connect LEDs for status indication
- Ensure proper power supply (5V for PIC18F4550)
- Base Button: Return to main menu from any state
- Left/Right Buttons: Navigate between menu options
- Up/Down Buttons: Adjust values in configuration modes
- Navigate to alarm configuration states
- Use up/down buttons to adjust high and low thresholds
- System will trigger warnings when sensor readings exceed limits
- Access time setting modes through menu navigation
- Adjust hours, minutes, and seconds individually
- Changes are automatically saved to RTC
- Navigate to language menu
- Choose from 6 available language options
- Interface will update to selected language
Key configuration options in defines.h:
FREQ: System frequency (20 MHz)NUMBER_LANGUAGES: Available languages (6)MAX_ADC_VALUE: Maximum ADC reading (1000)MIN_ADC_VALUE: Minimum ADC reading (0)
- LCD Data: PORTD (RD0-RD7)
- LCD Control: RA2 (RS), RA3 (EN)
- I2C: RC3 (SCL), RC4 (SDA)
- ADC Input: RA0 (AN0)
- LED Outputs: Configurable in LED.c
- PIC18F4550 Datasheet
- DS1307 RTC Datasheet
- MCP4725 DAC Datasheet
- PCB design files are available in the
hardware/directory
This project is licensed under the terms specified in the LICENSE file.