ATMEGA324A - ECG Atmel Assembler programming using RS232.

Thread Starter

Jaime Santos

Joined Dec 16, 2016
3
Good evening, im 3rd year physics engineering course and we're doing an ECG in PCB and using ATMEGA324A as the microcontroller along with the biomedical engineering course.

Me and my group mates are having a really hard time with coding this, since we have absolutely no microcontroller programming background, let alone assembly programming bases, and this project has been an overall struggle.

So i'm here asking you guys for help, any books, online courses, pdf's or whatever help you could recommend would be greatly appreciated. Thank you.
 

Thread Starter

Jaime Santos

Joined Dec 16, 2016
3
sounds like you took the wrong class.
Unfortunately, in my country, after highschool , once you sign up to an university course, all 5 years (in my case 5 because of integrated masters degree) of classes are pre-determined. So yeah, its not that i took the wrong class, is more that my teacher doesnt want to have the trouble of finding a project that's suited to our capabilities, so we're just stuck with whatever biomedical engineering has.
 

Thread Starter

Jaime Santos

Joined Dec 16, 2016
3
Hi, and welcome to the forum.

Have you read the MCUs datasheet? Lots and lots of good information and code examples, both in C and assembler.

Enjoy!
Yeah, we're slowly sniffing through the datasheet, but welding every component without shorting the PCB took more time than we expected (note that our course never included welding classes) so we're left with roughly one week until project presentation. This obviously isnt enough time to understand the mechanics of the programming we need through the datasheet, so i am trying my luck finding something a little more succint to speed up the process.
 

nerdegutta

Joined Dec 15, 2009
2,684
Hi.
in my country
What is your country? To better understand your situation, it's sometimes good to tell people where you are from.

included welding classes
... and with welding you actually mean soldering?

When did you get this assignment?

Upload a schematic, and your code, and we'll take it from there. I do not think you'll find anyone on this site that will do the project for you, but... You'll find a lot of people who can guide you and point you in the right direction.
 

DickCappels

Joined Aug 21, 2008
10,187
If you don't already have it, get the instruction set manual, you will refer to it often. Pay special attention to sections 1 and 2 and take note that there are specialized uses for many of the registers.
www.atmel.com/images/Atmel-0856-AVR-Instruction-Set-Manual.pdf

Similarly, you will probably want to keep the Assembler Guide around
academy.cba.mit.edu/classes/embedded_programming/doc1022.pdf

Join AVRFREAKS
http://www.avrfreaks.net/?name=PNphpBB2&file=viewforumf=3&sid=6d22b703157d05927c69e59d892a0da3
You can learn a lot by just reading how others have solved problems similar to yours. There are some old hands on the forum who are able to answer just about any question about the product family and tools.

And a word of caution.
The datasheet includes the following warning (Page 7 of the version I am using):

About Code Examples

<some text removed for clairiity>
For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI” instructions must be replaced with instructions that allow access to extended I/O. Typically “LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.

Take heed. This applies to your controller. The ATMEGA324's I/O space is extended, though many of the programming examples in the datasheet will not work. You will need to substitute the latter expressions (mainly LDS and STS).
 
Top