Opened 7 months ago

Last modified 4 months ago

#33 new task

ATMEGA328/328P: USART simulation (with pty connection)

Reported by: dsl Owned by: dsl
Priority: major Milestone: MCUSim-0.2
Component: avr Keywords: planned-in-0.2
Cc: Pawel

Description

I'd like USART of the ATmega328/328P to be simulated the vary same way as it
has been done for ATmega8A: https://trac.mcusim.org/ticket/10.

There is a group of functions called MSIM_PTY_*() which can be used to work
with POSIX pseudo-terminals. Take a look at the tick_usart(), usart_receive()
and usart_transmit() functions of ATmega8A to understand how serial port
of a microcontroller can be paired with a pseudo-terminal in the operating
system.

Ideally, I'd want a simulated ATmega328/328P to be started with Optiboot
and program it with AVRDude as it would be a hardware. Note that Optiboot uses
a watchdog timer and MCUCR/MCUCSR register to find out what the last reset
reason really was. Take a look at the tick_wdt() to see how it could be
implemented.

Change History (5)

comment:1 Changed 7 months ago by dsl

comment:3 Changed 6 months ago by dsl

Milestone: MCUSim-0.2MCUSim 0.2

Milestone renamed

comment:4 Changed 6 months ago by dsl

Milestone: MCUSim 0.2mcusim 0.2

Milestone renamed

comment:5 Changed 4 months ago by dsl

Milestone: mcusim 0.2MCUSim-0.2

Milestone renamed

Note: See TracTickets for help on using tickets.