Skip to content

ShravanaHS/Arduino-MEGA-ATmega640-Bare-Metal-Programming

Repository files navigation

πŸš€ Arduino MEGA (ATmega640/2560) Bare Metal Programming

Welcome to the Bare Metal Programming repository! This project serves as a comprehensive guide to direct register manipulation using the ATmega640/2560 microcontroller. All simulations are designed to run on Wokwi.

πŸ“‚ Repository Structure

The assignments and projects are categorized by interface type:

  • 1. LED Assignments: Fundamental GPIO operations using LEDs.
  • 2. Seven Segment Display: Interfacing with 7-segment displays.
  • 3. Dot Matrix Display: Controlling LED matrices.
  • 4. Keypad Interfaces: Reading input from keypads.
  • 5. Pushbutton Assignments: Controlling inputs with buttons.
  • My Projects: Custom personal projects.

1. πŸ’‘ LED Assignments

Set 1: Basic LED Control

# Problem Objective Registers Used Simulation
1 Problem 1 Connect LED to Port J bit 0 DDRJ, PORTJ View
2 Problem 2 Connect LED to Port D bit 7 DDRD, PORTD View
3 Problem 3 Connect LEDs to Port H bit 6 & 0 DDRH, PORTH View
4 Problem 4 Connect LEDs to Port C bit 6 & 7 DDRC, PORTC View
5 Problem 5 Connect LEDs to Port A bit 0-3 DDRA, PORTA View
6 Problem 6 Connect LEDs to Port B bit 4-7 DDRB, PORTB View
7 Problem 7 Connect 8 LEDs to Port F DDRF, PORTF View
8 Problem 8 Connect 8 LEDs to Port K (Odd/Even) DDRK, PORTK View
9 Problem 9 Connect 8 LEDs to Port L (Even) DDRL, PORTL View
10 Problem 10 Connect 8 LEDs to Port E (Specific) DDRE, PORTE View

Set 2: Sequence & Control

# Problem Objective Registers Used Simulation
1 Problem 1 Connect 8 LEDs to Port A (Blink All) DDRA, PORTA View
2 Problem 2 Connect 8 LEDs to Port B (Seq Accumulate) DDRB, PORTB View
3 Problem 3 Connect 8 LEDs to Port C (Seq Blink) DDRC, PORTC View
4 Problem 4 Connect 8 LEDs to Port C (Seq Blink Single) DDRC, PORTC View
5 Problem 5 Connect LED to Port J Bit 0 (Blink) DDRJ, PORTJ View
6 Problem 6 Connect 8 LEDs to Port K (Even Blink) DDRK, PORTK View
7 Problem 7 Connect 8 LEDs to Port L (0-3 Seq) DDRL, PORTL View
8 Problem 8 Connect 8 LEDs to Port F (4-7 Seq) DDRF, PORTF View
9 Problem 9 Connect 8 LEDs to Port F (7-4 Reverse) DDRF, PORTF View
10 Problem 10 Connect 8 LEDs to Port F (Code 7-4 / Obj 3-0) DDRF, PORTF View

Set 3: Pattern Logic

# Problem Objective Registers Used Simulation
1 Problem 1 Connect 8 LEDs to Port A (Pairs 0,4...3,7) DDRA, PORTA View
2 Problem 2 Connect 8 LEDs to Port A (Seq Pairs 0-4 w/ Clear) DDRA, PORTA View
3 Problem 3 Connect 8 LEDs to Port A (Seq 0-7, 7-0) DDRA, PORTA View
4 Problem 4 Connect 8 LEDs to Port A (Pattern 0,2,1,3...) DDRA, PORTA View
5 Problem 5 Connect 8 LEDs to Port A (Pairs 01, 67, 23, 45) DDRA, PORTA View
6 Problem 6 Connect 8 LEDs to Port A (Pairs 45, 23, 67, 01) DDRA, PORTA View
7 Problem 7 Connect 8 LEDs to Port A (Groups 012, 567, 34) DDRA, PORTA View
8 Problem 8 Connect 8 LEDs to Port A (Groups 34, 567, 012) DDRA, PORTA View
9 Problem 9 Connect 8 LEDs to Port A (Accumulate 0-7) DDRA, PORTA View
10 Problem 10 Connect 8 LEDs to Port A (Accumulate 7-0) DDRA, PORTA View

Set 4: Advanced LED Operations

# Problem Objective Registers Used Simulation
1 Problem 1 Dual Port ON DDRA, DDRB View
2 Problem 2 Alternating Rows DDRA, DDRB View
3 Problem 3 Sequential Row Blink DDRA, DDRB View
4 Problem 4 Parallel Sequential Mirror DDRA, DDRB View
5 Problem 5 Row-by-Row Sequence DDRA, DDRB View
6 Problem 6 Parallel Sequential Mirror DDRA, DDRB View
7 Problem 7 4 by 4 Blink (See README) DDRA, DDRB View
8 Problem 8 Alternate Pattern Blink DDRA, DDRB View
9 Problem 9 Pair Blink DDRA, DDRB View
10 Problem 10 Reverse Pair Blink DDRA, DDRB View

2. πŸ”’ Seven Segment Display

Set 1: Basic Display

# Problem Objective Registers Used Simulation
1 Problem 1 Interface 7-Segment (Display 0-9) DDRA, PORTA View
2 Problem 2 Display '1' (Single Digit) DDRA, PORTA View

Set 2: Sequence & Patterns

# Problem Objective Registers Used Simulation
1 Problem 1 Sequence 0-9 (Common Cathode) DDRA, PORTA, TCNT1 View
2 Problem 2 Sequence 0-9 (Common Anode) DDRA, PORTA, TCNT1 View
3 Problem 3 (Duplicate of Problem 1) DDRA, PORTA, TCNT1 View
6 Problem 6 Countdown 9-0 DDRA, PORTA, TCNT1 View
7 Problem 7 Even Numbers (0-8) DDRA, PORTA, TCNT1 View
8 Problem 8 Even then Odd Sequence DDRA, PORTA, TCNT1 View
9 Problem 9 Alphanumeric Sequence DDRA, PORTA, TCNT1 View
10 Problem 10 Prime Numbers (2,3,5,7) DDRA, PORTA, TCNT1 View

3. πŸ“‰ Dot Matrix Display

Assignments

(Coming Soon)

# Problem Objective Registers Used Simulation
- - - - -

4. 🎹 Keypad Interfaces

Assignments

(Coming Soon)

# Problem Objective Registers Used Simulation
- - - - -

5. πŸ”˜ Pushbutton Assignments

Set 1: Basic Input Logic

# Problem Objective Registers Used Simulation
1 Problem 1 Blink All LEDs (PB0) DDRA, PINB View
2 Problem 2 Blink All LEDs (PB1) DDRA, PINB View
3 Problem 3 Sequential Blink (PB3) DDRA, PINB View
4 Problem 4 Reverse Sequence (Any) DDRA, PINB View
5 Problem 5 Even LEDs (PB0) DDRA, PINB View
6 Problem 6 Odd LEDs (PB6) DDRA, PINB View
7 Problem 7 Direct Mapping DDRA, PINB View
8 Problem 8 Reverse Mapping DDRA, PINB View
9 Problem 9 Continuous Sequence DDRA, PINB View
10 Problem 10 Specific Pattern (PB0) DDRA, PINB View

Set 2: Advanced Sequences

# Problem Objective Registers Used Simulation
1 Problem 1 Sequence 1-2-5-6 (PB1) DDRA, PINB View
2 Problem 2 Sequence 3-1-7-4 (PB2) DDRA, PINB View
3 Problem 3 Sequence 0-1-5-6 (PB3) DDRA, PINB View
4 Problem 4 Sequence 3-5-7-6 (PB5) DDRA, PINB View
5 Problem 5 Sequence 0-1-4-7 (PB7) DDRA, PINB View

πŸ› οΈ My Projects

Project Name Description Link
- - -

About

Direct register manipulation assignments for ATmega 640/2560 using Wokwi simulation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages