Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1) Write an instruction sequence to output the value 0x53 to PORTA. Q2) Write an instruction sequence to read the value in register r20. voltage

Q1) Write an instruction sequence to output the value 0x53 to PORTA.

Q2) Write an instruction sequence to read the value in register r20. voltage levels on PORTB pins and place the value in register r20

Please include full working code, Including any setup code. I have what i think should work, but i keep getting errors

for 8.1 I have,

LDI r16, 0xFF

OUT DDRA, r16

LDI r16, 0x53

OUT PORTA, r16

I get the errors 'Undefined symbol:DDRA' and Undefined symbol: PORTA'

For 8.2 I have

LDI r16, 0x00

OUT DDRB, r16

IN r20, PINB

With similar errors, I dont know how to 'define' the ports and DDRB/DDRA

The code needs to actually work in the Atmel assembly studio

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions