Struggling to produce ECG register level programming on arduino

Hello

I’m currently trying to use the arduino ATMEGA328P with the circuit diagram attached below to get an ECG reading from electrodes connected to my body, but i wanted to try making a register level program in arduino to do so. The output of the circuit is connected to the arduino and i use three ecg leads, two in the input of the instrumentation amplifier connected to both wrists and one lead connected to ground to the left ankle.

I have currently made attempts at a program but I haven’t succseeded in my attempts, I’m writing this message to see how to make the register-level code to display the ECG signal on the serial plotter.

Thank you

ECG CIRCUIT DIAGRAM.pdf (12.9 KB)

Please post your program and explain the problems that you had with it

Currently, my problem is don’t know where to start as I can’t find where i can learn to produce the code, i can show my code used to show the ECG but it isn’t the register-level programming that I’m trying to use, I’ll attach the code I have made to show what outcome i’m trying to get

Thanks for replyng

Screenshot 2020-03-10 at 4.49.11 PM.png

You have posted code without using code tags. The code tags make the code look

like this

when posting source code files. It makes it easier to read, and can be copied with a single mouse click. Also, if you don't do it, some of the character sequences in the code can be misinterpred by the forum code as italics or funny emoticons. The "Code: [Select]" feature allows someone to select the entire sketch so it can be easily copied and pasted into the IDE for testing.

You seem to be at the very beginning programming level. I think you will not be able to learn register level programming by reading posts in this forum. For that to work, you have to already have some regular IDE code experience, and have studied at least a few register examples, data sheets, and other documentation concerning registers.

@fawkes_abbes,

What problem are you trying to solve?

BTW, pictures of code are worthless. Won't even open it. Post your code properly in-line using Code Tabs.

Sorry for the mistake, heres the code:

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

void setup() {
Serial.begin(4800);
}

void loop() {
val=analogRead(analogPin):
Serial.printIn(val);
delay(5);
}]

Maybe my first post wasn't clearly layed out, I have made the arduino display my ECG on the serial plotter but i would like to do the same, but with register-level programming, I have tried to look at resources online but can't find any that can show me what I'm looking for.