I need a coder for ATMega4808 in Microchip Studio

Job ID: 36247996

Budget: €30 – €250 EUR

The purpose of the Laboratory Exercise is to simulate the operation of a highway intersection, which consists of a major road and a vertical railway. On the main road there is a traffic light for cars and a traffic light for pedestrians, which lights up only after pressing a button (push button). A tram passes the railway at regular time intervals t = T1 and interrupts the normal traffic, i.e. the red light for the main road and the green light for pedestrians are activated for a time interval t = T2. Also, when the pedestrian button is pressed, it turns on the red traffic light for the main road along with the green traffic light for pedestrians, for the same time period t = T2. After the interval t = T2, the red traffic light and the green traffic light are activated. Before the pedestrian button can be pressed again (i.e. to activate the green pedestrian light) a time interval t = T3 must have passed. In the event that the pedestrian light button is pressed and it is already active (either it has already been pressed once or the tram is passing on the railway) the operation in progress must not be interrupted and the active time slots must be kept until they are completed.
To implement Lab Exercise 1, consider that:
• The traffic light is green when the LED is on (logic '0') and red when it is off (logic '1'). The three PORTD PINs used are PIN0, PIN1 and PIN2. For the tram simulation, the corresponding LED (PIN1) will be on when the tram passes that point on the railway and off otherwise.
• The pedestrian button must be pressed with an interrupt. Using PIN5 of PORTF will be used.
• The TCA0 timer/counter can be split into two smaller timers/counters of 8-bits each, with the TCA0.SPLIT instruction set. One of them will be used for the two time intervals t = T2 and t = T3. The second one for the time interval t = T1 which defines every time a tram passes, with the corresponding function being activated. You set the time units, which make it easier for you, for the simulation, but explain the way of thinking and the process of calculating the values (values).
Related categories: C Programming C++ Programming