register-level programming querie

Hello

I've made a similar message before but don't think my message was clear to understand. I currently have a simple code that allows my function generators signal to be displayed on my PC's screen using serial plotter.

I am trying now to replicate the same code but in register-level programming and don't know where to start or any where i can find this information. I would be greatful for any help.

[/int analogPin = A0;
int val = 0;

void setup() {
  // put your setup code here, to run once:
Serial.begin(4800)
}

void loop() {
  // put your main code here, to run repeatedly:
val=analogRead(analogPin);
Serial.println(val);
delay(5);
}]

You can see the registers involved in the functions you referenced by looking at the source of these functions.
If you have installed the IDE, you have the source.

I’m puzzled why you’d want it do this though.

Your code doesn’t compile, BTW.

I have exams coming up for register-level programming so i need to understand how to do these types of programming techniques.

I'm still not sure how to look at the source, do i have to open the arduino IDE page and go into settings

fawkes_abbes:
I'm still not sure how to look at the source, do i have to open the arduino IDE page and go into settings

also learn the processor:
http://www.atmel.com/images/Atmel-8271-8-bit-AVR-Microcontroller-ATmega48A-48PA-88A-88PA-168A-168PA-328-328P_datasheet_Complete.pdf

by 'register-level programming' do you mean

the machine level code

OR

you just want to know what values are are being put into the corresponding registers for your example code?

for the latter, you can simply open up the related libraries to see how it is done.

(deleted)