Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[51] Microcontroller basics

Status
Not open for further replies.

slyfth

Junior Member level 2
Junior Member level 2
Joined
Oct 13, 2013
Messages
24
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
232
Hi guys!


A complete newbie here. Let's say I am at the 'a' of microcontroller knowledge. I am studying this course in uni in the current semester. However, we are more focused on theory there - Instruction sets, writing programs on paper, interrupts etc. I am planning to develop a project namely 'Wireless Energy meter' where we take I/P from an analogue energy meter using a IR sensor and then transmit the data for every unit of electric power consumed, using an RF module. On the receiver end, we will be using a microcontroller along with maybe an adder to add the total units consumed and display it onto a 7 segment LCD.
Now the reason I am here is because i need help with some really stupid and basic questions here. I hope someone here can help. I am planning to use an AT89C51 MCU for the purpose of my project and after having spent a good 7 to 10 days searching on the internet to find answers, I am again where I started from - Square 1.
So my questions:
a) Because the project is going to be a low cost project, how do I make a homegrown 'development board/development kit/demo board/programmer/burner' to burn the hex code to MCU?
b) Is there any difference between these terms 'development board/development kit/demo board/programmer/burner' or can these be used interchangeably? What confused me was this post where it mentioned that the tutorial was for a prototyping board and for programing the MCU you need a separate ISP programmer and in case of use of P89V51RD2 microcontroller you just need a max232 IC and a serial cable to program it.?
c) Are burning and programming the MCU with the hex code not the same things?
d) Once I am able to burn the MCU and I burn it, I will be able to overwrite the MCU with the new hex code for another project or not? Shouldn't the ROM in the MCU be working the same way it works in a mobile phone where we 'flash' ROMs to overwrite previous ROM?
e) Can I use an RS232 from my laptop or a USB to serial for this homegrown board, to program the MCU?

Hoping a lot here. So that I get past the internet surfing phase for finding answers and actually get started on with the project(s).


Thanks!
 

Hi, if you are looking at the evaluation board document from Atmel on the AT89C51 ( http://www.atmel.com/Images/doc7676.pdf ) it should help to get a starting point. To answer your questions it is important to understand also what hardware capabilities your "home grown kit" has.

a) If it has the same capabilities as the evaluation kit from Atmel - yes, it can burn the hex code!
b) There are kits who have the build-in programming capability and others have it separated in two boards!
c) Yes! But sometimes you can run program code first in RAM to test it and then program it into Flash.
d) Flash memory needs to be erased before you program it. The programming software will take care of it!
e) In case of the Atmel evaluation board - yes! There are two methods(see page 11)!

Good evaluation boards have also a development s/w running on the PC with assembler, debugger and downloads for programming and controlling the eval-board. This makes a complete development and test system. You may also look for a boards which has also an LCD display for your application.

Enjoy your design work!
 

Hi, thank you for the quick reply there. Maybe I was not able to put my query forth in a correct way.

Yes, I want to do a D.I.Y. board for this MCU project and no I don't care much about the devices I can interface with it. I need this board only for burning the HEX code onto the chip, as for the testing, I will be using an open source freeware to test the functioning of the code. So, the questions filter down to:

i) How do I do a D.I.Y. board for use as a burner for AT889c51?


ii) I am not clear on what the difference between the terms: development board/development kit/demo board/prototyping board/programmer/burner, though I understand from the previous reply that a programmer or burner are the same things and used for burning the HEX code onto the MCU.


In the b) answer above, HTA said that the board and programmer may or may not be 2 separate boards. If there are 2 different boards, what is the purpose of the 'non-programmer' board?

Apologies if my questions are too stupid.


Thanks
 

Hi

To program MCU you need a programmer
Some development board comes with together ( MCU + Programmer )

First buy this kind of board and then try to write a program to blink LED, then develop it up to your expected project which you posted in your first post

**broken link removed**
 

a, 'development board/development kit/demo board' etc are same. some may come with programmer or with out programmer + other options like ADC/LCD etc.

'programmer/burner' is same. which is used to burn the hex code to MCU.

b, for 89sXX series you need separate programmer. for 89v51rd2 you just need a max232 IC and a serial cable.

c, yes they are.

d, your programmer/burner takes the process of erasing the ROM and update it with selected hex source. the last programmed code will exist till you erase or rewrite new code.

e, if you have a serial port you can use it or else you should use USB serial converter.
 

Thank you @welove8051. Your reply does answer many of my questions. I still have 1 question though, how do I make one burner for myself? What are the components required apart from resistors and capacitors and how do I go about building an inexpensive one? It should be able to support more or less all the popular AT89 series of Atmel MCs.


Thanks!
 

Thank you @welove8051. Your reply does answer many of my questions. I still have 1 question though, how do I make one burner for myself? What are the components required apart from resistors and capacitors and how do I go about building an inexpensive one? It should be able to support more or less all the popular AT89 series of Atmel MCs.


Thanks!

if you have parallel port then try this programmer .

for USB try this programmer. for that you need atmega8 programmer.

i suggest you to buy **broken link removed**.
 

OK, so I think I might be able to borrow a burner from a mate for a couple of days. However, I'm now confused as to which MCU to choose. In the first post I have given a brief overview of what I plan to do and I am looking at the AT89 series but just don't know which one. I can choose AT89s52 but I don't want to go for an overkill and add to cost of the project, unnecessarily. So if someone can please advise here as to which 8051 variant will best fit the needs of my project.

Thanks.

Posted via Topify on Android
 

8051 series is one of the low cost micro ocntroller series. 89s52 will cost less than 1 dollar. it will be a fraction higher than s51. so you can go with 89s52
 

You can proceed with 89S52 controller. Untill unless you have programmer for that you won't be having any issues with it. It is also very cheap.
 
  • Like
Reactions: Dont

    Dont

    Points: 2
    Helpful Answer Positive Rating
@welove8051 @surendhar
Thank you for your help, guys.
Forgive my ignorance for I didn't know that the cost doesn't vary much with the up gradation of variant. While s52 is fine as you guys advised but, out of curiosity, is there another better/more featured 8051 variant available in the market that you might suggest? Maybe I can go for that itself and learn and reuse the mcu for more complex projects in the future.

Thanks.

Posted via Topify on Android
 

In that case go for P89V51RD2/RC2/RD2 controller from NXP. It doesn't need programmer you just need a serial cable with MAX232 IC. By using flashmagic you can program your controller.
 
  • Like
Reactions: Dont

    Dont

    Points: 2
    Helpful Answer Positive Rating
89v51 might be good as far as the burning goes but what about the functionality. I might be open to avr and pic too.

Posted via Topify on Android
 

What is wrong with the functionality? it is similar with AT89S52 but price is little higher.
 
  • Like
Reactions: Dont

    Dont

    Points: 2
    Helpful Answer Positive Rating
No, I never said that there's anything wrong with the functionality. What I meant to ask was, had I not limited myself to s52 or 51-variant on the whole, would there have been a different suggestion from you as to which MCU to use?

Posted via Topify on Android
 

start with 8051 you can learn easily and then you can migrate to other
 

Thank you guys. So maybe I'll start with my project using 89v51 in a week or so once I have arranged all the parts required and update this thread from time to time on how it is progressing.

Posted via Topify on Android
 

Guys, while I feel that I am quite clear on the initial questions here but have some more doubts which I hope someone here can hep me with.

What basically is the difference between programming methods of 89c2051 and 89s52. I understand that the latter being ISP, can be programmed while it is still in the circuit but what about 89c2051? How can I program that using the USB port on my laptop? From what I understand, I think, 89s52 can be programmed using a USB to RS232 converter, right?
Please let me know which is the best way to program both, 89c2051 and 89s52, using USB port on my laptop?

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top