d123
Advanced Member level 5
Hi,
I'm doing preliminary research/reading about using a microcontroller. I see I have a lot more to read before a lot of the fun of e.g. making LEDs blink, but still. The attached picture is if it helps to visualize the basic idea - it's a block diagram concept, not a complete circuit design. I'm posting the thread because before I accidentally spend time going down the wrong path reading and trying to do, I wondered if the basic plan I've come up with is - in principle - workable or I've misunderstood something I have read so far. And I have some pertinent questions.
Background:
ICs I have at my disposal are:
FT245BM (USB to parallel)
AT90S1200
AT90S8515
Assorted logic and so on to fill gaps where needed.
Money to buy interface tools, etc = 0.00
I have a laptop with no parallel port, so that simple-looking to implement programming interface isn't possible.
I've read a lot of the FDTI application notes about the FT245BM and the relevant datasheet, and downloaded the relevant drivers and utilities they provide which will be needed and/or useful. I think I more or less understand it and what it does and what I have to do with it. I still some major doubts about what pins go where on the AT90Sxxxx for parallel programming that are irrelevant questions for the timebeing.
I've read two decent manuals on programming AVRs with assembler code and other related material. I still have to go through the 'avr-instruction-set-manual'.
I've downloaded the Studio 7 program and am halfway through reading the user manual, and I have read a couple of other things that are related to this.
I realised today that I need to learn how to calculate values in hexadecimal as I don't understand that part and the examples of e.g. ADD and ADDC baffle me - again, irrelevant for the timebeing.
Question(s):
I understand it is better to write the code in Assembler language as it is smaller, quicker, etc. But, it looks like the examples I will need to desperately try and fail to understand in e.g. Studio 7 are all in what looks like C of one kind or another. Is it a good idea to start off in Assembler if coding experience is only a little Visual Basic several (many) years ago and a tiny bit of HTML and a tiny bit of Python? Assembler looks managable from the examples I have seen so far, or does it become inscrutable when things are not working as wished for and C+ or C++ is less painful to debug?
re the 'programming board idea - Is that going to/Theoretically, should it work: Studio 7 with projects written in Assembler > USB port > FT245BM >AT90Sxxxx ? Am I missing anything very important from even just a block diagram concept?
Just checking my confusion: The executable code I write goes to the Flash memory (e.g. 'normally do this, if X do that, if Y don't do the other, etc'), the constant values I may need for calculations (e.g. maybe a few constants/values for a bad humidity sensor that drifts enormously with temperature and has a long equation to correct the error) go to the EEPROM?
It is more important not making mistakes with the program code as the Flash is very limited read/write and I should be using the IDE to try to ensure this, so a lot of time is spent developing in the IDE in software and not so much time in-circuit post-programming in hardware? EEPROM gets read/written to much more often and during the execution of a program?
I must say, from what I've read so far, this all seems very time-consuming, convoluted and complicated just to get an LED to blink via a pushbutton, I can do that without the MCU as the go-between and just use my finger instead... (joke).
Pathetic picture:
I'm doing preliminary research/reading about using a microcontroller. I see I have a lot more to read before a lot of the fun of e.g. making LEDs blink, but still. The attached picture is if it helps to visualize the basic idea - it's a block diagram concept, not a complete circuit design. I'm posting the thread because before I accidentally spend time going down the wrong path reading and trying to do, I wondered if the basic plan I've come up with is - in principle - workable or I've misunderstood something I have read so far. And I have some pertinent questions.
Background:
ICs I have at my disposal are:
FT245BM (USB to parallel)
AT90S1200
AT90S8515
Assorted logic and so on to fill gaps where needed.
Money to buy interface tools, etc = 0.00
I have a laptop with no parallel port, so that simple-looking to implement programming interface isn't possible.
I've read a lot of the FDTI application notes about the FT245BM and the relevant datasheet, and downloaded the relevant drivers and utilities they provide which will be needed and/or useful. I think I more or less understand it and what it does and what I have to do with it. I still some major doubts about what pins go where on the AT90Sxxxx for parallel programming that are irrelevant questions for the timebeing.
I've read two decent manuals on programming AVRs with assembler code and other related material. I still have to go through the 'avr-instruction-set-manual'.
I've downloaded the Studio 7 program and am halfway through reading the user manual, and I have read a couple of other things that are related to this.
I realised today that I need to learn how to calculate values in hexadecimal as I don't understand that part and the examples of e.g. ADD and ADDC baffle me - again, irrelevant for the timebeing.
Question(s):
I understand it is better to write the code in Assembler language as it is smaller, quicker, etc. But, it looks like the examples I will need to desperately try and fail to understand in e.g. Studio 7 are all in what looks like C of one kind or another. Is it a good idea to start off in Assembler if coding experience is only a little Visual Basic several (many) years ago and a tiny bit of HTML and a tiny bit of Python? Assembler looks managable from the examples I have seen so far, or does it become inscrutable when things are not working as wished for and C+ or C++ is less painful to debug?
re the 'programming board idea - Is that going to/Theoretically, should it work: Studio 7 with projects written in Assembler > USB port > FT245BM >AT90Sxxxx ? Am I missing anything very important from even just a block diagram concept?
Just checking my confusion: The executable code I write goes to the Flash memory (e.g. 'normally do this, if X do that, if Y don't do the other, etc'), the constant values I may need for calculations (e.g. maybe a few constants/values for a bad humidity sensor that drifts enormously with temperature and has a long equation to correct the error) go to the EEPROM?
It is more important not making mistakes with the program code as the Flash is very limited read/write and I should be using the IDE to try to ensure this, so a lot of time is spent developing in the IDE in software and not so much time in-circuit post-programming in hardware? EEPROM gets read/written to much more often and during the execution of a program?
I must say, from what I've read so far, this all seems very time-consuming, convoluted and complicated just to get an LED to blink via a pushbutton, I can do that without the MCU as the go-between and just use my finger instead... (joke).
Pathetic picture: