Help needed for microcontroller based project.

Hi Group, We are a group of four B.E students studying in M.h.S.S. COE, Mumbai, India. We writing to you to seek some help and guidance. Since this is our first microcontroller based project, we are unaware about the practicalities and methodologies that go into it. In our project, we have decided to use the following: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX IC 741/ LM324: COMPARATOR

LOGIC: 8 channels connected to the MUX, depending on which input is enables, MUX selects it and sends it to the COMPARATOR. The second input to comparator is a reference voltage. Comparator's output to port

1.0. Ports 1.1,1.2,1.3 as selects lines to MUX. Ports 1.4,1.5 for intefacing with memory. Ports 3.0,3.1 as RXD and TXD. Ports 3.2,3.3,3.4 for interfacing with RTC. Using select lines of MUX , we wish to determine which channel is enabled. using RTC we wish to sore the real time and pin number in EEPROM. Using RS232C we wish to display this data on a PC.

We are facing the following queries:

  1. Is our logic correct? Are all the Ic's comaptible?
  2. Useful tips from your side.

We are in the stage of preparing the circuit diagram and there are many doubts which occur. We would like you to suggest software for preparing schematics and layout. Is there some software available which directly converts schematic to layout? Please give names.

The next challenge is the software side. In our syllabus we have learnt C/C++. Since you have mastered this, please guide us how to write the programs and routines and recommend compliers, simulators and other software related to programming. Are programs and codes available on net? If yes, Please give the resource locations or websites.

Any help will be really encouraging and greatly appreicated by us. We look forward for some positive response. Last but not the least, we wish you a very happy and prosperous new year. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam
Loading thread data ...

Hi Group, We are a group of four B.E students studying in M.h.S.S. COE, Mumbai, India. We writing to you to seek some help and guidance. Since this is our first microcontroller based project, we are unaware about the practicalities and methodologies that go into it. In our project, we have decided to use the following: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX IC 741/ LM324: COMPARATOR

LOGIC: 8 channels connected to the MUX, depending on which input is enables, MUX selects it and sends it to the COMPARATOR. The second input to comparator is a reference voltage. Comparator's output to port

1.0. Ports 1.1,1.2,1.3 as selects lines to MUX. Ports 1.4,1.5 for intefacing with memory. Ports 3.0,3.1 as RXD and TXD. Ports 3.2,3.3,3.4 for interfacing with RTC. Using select lines of MUX , we wish to determine which channel is enabled. using RTC we wish to sore the real time and pin number in EEPROM. Using RS232C we wish to display this data on a PC.

We are facing the following queries:

  1. Is our logic correct? Are all the Ic's comaptible?
  2. Useful tips from your side.

We are in the stage of preparing the circuit diagram and there are many doubts which occur. We would like you to suggest software for preparing schematics and layout. Is there some software available which directly converts schematic to layout? Please give names.

The next challenge is the software side. In our syllabus we have learnt C/C++. Since some of you have mastered this, please guide us how to write the programs and routines and recommend compliers, simulators and other software related to programming. Are programs and codes available on net? If yes, Please give the resource locations or websites.

Any help will be really encouraging and greatly appreicated by us. We look forward for some positive response. Last but not the least, we wish you a very happy and prosperous new year. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

Use a real comparator like LM339 instead of an op-amp.

Unless you need to voltage range, use 74HC4051 instead of 4051B and run everything on +5V only. You don't say what range of input signals you want to monitor but for a student project, just getting things to work with a single power supply is pretty good. With a +5V only supply you can monitor from just above 0V to just below 5V. For extra credit, explain in your report why you can't get all the way to 0V and all the way to 5V.

If you want to use C, the SDCC compiler is free and pretty good for 8051 derivative microcontrollers. You can work under Linux or MS-DOS or Windows (>= W98). You supply the editor. Don't bother with C++ for this. That would be like driving tumbtacks with a sledge hammer. Assembly might be just fine. Also WinAVR would be a good choice for the Atmel 8051 derivatives.

Search around the web for various bootloaders and debugger/monitor programs. Google for "paulmon" and read his pages. Also look at his reference designs.

Design everything on paper, then start from the microcontroller and work outward, well and the power supply. Microcontroller + RS232 would be a good pair of chips to get working first. Then add the RTC. Then add the EEPROM, MUX and finally comparator. Heck, extra time left? Add an ADC (SPI bus, i2c bus or parallel) too or build one using comparators (lots of extra credit if you can build an 8-bit flash converter).

As for CAD software, there are free EDA packages, such as gEDA. CadSoft's Eagle should have all the parts already in its library that you would need for drawing your schematics and probably the free version may have sufficient capacity for your PCB too. But your design sounds simple enough that good-old wire-wrap or point-to-point wiring on perfboard should be sufficient.

If you guys can pool your money and are able to play nice together and share a copy, get The Art of Electronics, second Edition.

In general, Google is your friend for this project. There are tons of examples out there, some good, some bad. Look at a few and you with some concentration you will discover the good from the bad. If you do use information you find during a web search, be sure to give due credit in your report. Don't plagerize!

Have fun.

Rob

Reply to
Rob Young

Sounds okay.

Suggest you use an LM339 rather than an LM324 or 741 (the latter would require a negative supply to get common mode range that includes ground and you'd then have to clamp the output to the rails to avoid problems with the micro. The 339 just requires a pullup resistor (or maybe not even that if you use a pseudo-bidirectional input).

Get something very simple like the I2C + RTC + serial communications working first (say transmitting the current time to a PC one-way) and then build on that.

You can write this in assembly or C (or C++ but that would not make much sense). See what software your school has licenced for your use-- compilers and PCB CAD packages are generally not free.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

Cambridge has licenced a low-cost soft-cover edition for India and allowed to be sold in a few nearby countries (plus Africa). I see it listed for a paltry Rs.450, so they may as well snap up several copies.

Best regards, Spehro Pefhany

--
"it\'s the network..."                          "The Journey is the reward"
speff@interlog.com             Info for manufacturers: http://www.trexon.com
 Click to see the full signature
Reply to
Spehro Pefhany

big snip

You ask too much. Do lots of searching on the web for basic info. Do not ask for it here. For 8052 specific questions you should try

formatting link

Ian

Reply to
Ian Bell

As a student exercise I'd have thought that interfacng the I/O would be a useful learning process.

Graham

Reply to
Pooh Bear

"adam" schrieb im Newsbeitrag news: snipped-for-privacy@f14g2000cwb.googlegroups.com...

741 is not suitable, the LM324 does contain 4 of what you need only one but it will do.

Why don't you buy an ATmega128 from

formatting link
? It includes 8 analog inputs, RTC and enough self programmable Flash memory for your data, so your only additional chip would be a MAX232. No DS1307, no AT24C1024, no 4051 MUX and no LM324.

It has too many (unused) pins ?

Ok, then think about some ATtiny (The ATtiny11 does have a comparator, that will save you the LM324, the ATtiny24 has 8 analog inputs and a RTC which will save the 4051 and the comparator and the DS1307 from the parts you mentioned above) and a free C compiler like WinAVR/gcc.

--
Manfred Winterhoff, reply-to invalid, use mawin
Reply to
MaWin

In article , adam wrote: [....]

I suggest an LT1081 for the MAX232, they are easier to get.

If you are comparing I suggest you use a comparitor like the LM339 and not an op-amp like the LM324.

Don't trust the AT89C52's data sheet on the subject of in place programing. If you are using that one, buy a programmer. The Philips parts that can be programmed via the RS-232 may be a better option for you.

Add a 1N4005 diode and an LM7805 or the like to your list so that you have inverse protection and local regulation. It is much safer to do than rely on an external supply being set right.

[....]

I've hear people say they like Eagle for this purpose.

formatting link
I think.

The Keil stuff is fairly good but it cost money. A few free ones are on the web. Try google. Also feed "8051" and "free" into google.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

On Sat, 7 Jan 2006 17:33:02 +0000 (UTC) in sci.electronics.design, snipped-for-privacy@green.rahul.net (Ken Smith) wrote,

Unrelated. The Eagle software is from

formatting link

Reply to
David Harmon

How often are you going to be writing this 'real time' , and pin number to the EEPROM?. If it is more than a few times an hour, look at FRAM instead. It is amazing how quickly the life of a typical EEPROM, can get used up, if data is changing quickly.

Best Wishes

Reply to
Roger Hamlett

Hi Group, We wish to thank you all for the immediate and informative response to our previous topic. We wish to know about programming the microcontroller and associated chips this time. These are the chips we have decided to use: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX LM339: COMPARATOR

  1. What are the different stages that go into programming from start to end?

  1. What are the various software requirements at each stage?
  2. We have searched and got some routines and codes from the internet. But these are for 8051 or for other derivatives. Is there some website from where basic codes like read/write/erase of EEPROM, Programming of RTC and Reading RTC, etc can be available.
4.Lastly we are using RS232c cable for PC interface. We wish to display a few details like pin number and the real time clock n the PC in the simplest way. Please suggest ways to go about it. some have suggested Visual Basic. Are VB codes for such application availalbe on the internet?

We wait for positive response. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

In article , Roger Hamlett wrote: [...]

If there isn't much data, a battery backed static ram can be a good way to go.

--
--
kensmith@rahul.net   forging knowledge
Reply to
Ken Smith

Hi Group, We are a group of four B.E students studying in M.h.S.S. COE, Mumbai, India. We writing to you to seek some help and guidance. Since this is our first microcontroller based project, we are unaware about the practicalities and methodologies that go into it. In our project, we have decided to use the following: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX IC 741/ LM324: COMPARATOR

LOGIC: 8 channels connected to the MUX, depending on which input is enables, MUX selects it and sends it to the COMPARATOR. The second input to comparator is a reference voltage. Comparator's output to port

1.0. Ports 1.1,1.2,1.3 as selects lines to MUX. Ports 1.4,1.5 for intefacing with memory. Ports 3.0,3.1 as RXD and TXD. Ports 3.2,3.3,3.4 for interfacing with RTC. Using select lines of MUX , we wish to determine which channel is enabled. using RTC we wish to sore the real time and pin number in EEPROM. Using RS232C we wish to display this data on a PC.

We are facing the following queries:

  1. Is our logic correct? Are all the Ic's comaptible?
  2. Useful tips from your side.

We are in the stage of preparing the circuit diagram and there are many doubts which occur. We would like you to suggest software for preparing schematics and layout. Is there some software available which directly converts schematic to layout? Please give names.

The next challenge is the software side. In our syllabus we have learnt C/C++. Since some of you have mastered this, please guide us how to write the programs and routines and recommend compliers, simulators and other software related to programming. Are programs and codes available on net? If yes, Please give the resource locations or websites.

Any help will be really encouraging and greatly appreicated by us. We look forward for some positive response. Last but not the least, we wish you a very happy and prosperous new year. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

Hi Group, We wish to thank you all for the immediate and informative response to our previous topic. We wish to know about programming the microcontroller and associated chips this time. These are the chips we have decided to use: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX LM339: COMPARATOR

  1. What are the different stages that go into programming from start to

end?

  1. What are the various software requirements at each stage?
  2. We have searched and got some routines and codes from the internet. But these are for 8051 or for other derivatives. Is there some website from where basic codes like read/write/erase of EEPROM, Programming of RTC and Reading RTC, etc can be available.
4.Lastly we are using RS232c cable for PC interface. We wish to display

a few details like pin number and the real time clock n the PC in the simplest way. Please suggest ways to go about it. some have suggested Visual Basic. Are VB codes for such application availalbe on the internet?

We wait for positive response. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

Hi Group, We are a group of four B.E students studying in M.h.S.S. COE, Mumbai, India. We writing to you to seek some help and guidance. Since this is our first microcontroller based project, we are unaware about the practicalities and methodologies that go into it. In our project, we have decided to use the following: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX IC 741/ LM324: COMPARATOR

LOGIC: 8 channels connected to the MUX, depending on which input is enables, MUX selects it and sends it to the COMPARATOR. The second input to comparator is a reference voltage. Comparator's output to port

1.0. Ports 1.1,1.2,1.3 as selects lines to MUX. Ports 1.4,1.5 for intefacing with memory. Ports 3.0,3.1 as RXD and TXD. Ports 3.2,3.3,3.4 for interfacing with RTC. Using select lines of MUX , we wish to determine which channel is enabled. using RTC we wish to sore the real time and pin number in EEPROM. Using RS232C we wish to display this data on a PC.

We are facing the following queries:

  1. Is our logic correct? Are all the Ic's comaptible?
  2. Useful tips from your side.

We are in the stage of preparing the circuit diagram and there are many doubts which occur. We would like you to suggest software for preparing schematics and layout. Is there some software available which directly converts schematic to layout? Please give names.

The next challenge is the software side. In our syllabus we have learnt C/C++. Since some of you have mastered this, please guide us how to write the programs and routines and recommend compliers, simulators and other software related to programming. Are programs and codes available on net? If yes, Please give the resource locations or websites.

Any help will be really encouraging and greatly appreicated by us. We look forward for some positive response. Last but not the least, we wish you a very happy and prosperous new year. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

Hi Group, We wish to thank you all for the immediate and informative response to our previous topic. We wish to know about programming the microcontroller and associated chips this time. These are the chips we have decided to use: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX LM339: COMPARATOR

  1. What are the different stages that go into programming from start to

end?

  1. What are the various software requirements at each stage?
  2. We have searched and got some routines and codes from the internet. But these are for 8051 or for other derivatives. Is there some website from where basic codes like read/write/erase of EEPROM, Programming of RTC and Reading RTC, etc can be available.
4.Lastly we are using RS232c cable for PC interface. We wish to display

a few details like pin number and the real time clock n the PC in the simplest way. Please suggest ways to go about it. some have suggested Visual Basic. Are VB codes for such application availalbe on the internet?

We wait for positive response. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

Hi Group, We wish to thank you all for the immediate and informative response to our previous topic. We wish to know about programming the microcontroller and associated chips this time. These are the chips we have decided to use: AT89C52/AT89S52: MICROCONTROLLER DS1307: RTC MAX232/MAX485: LEVEL CONVERTER AT24C1024: SERIAL EEPROM

4051B: 8:1 ANALOG MUX LM339: COMPARATOR

  1. What are the different stages that go into programming from start to

end?

  1. What are the various software requirements at each stage?
  2. We have searched and got some routines and codes from the internet. But these are for 8051 or for other derivatives. Is there some website from where basic codes like read/write/erase of EEPROM, Programming of RTC and Reading RTC, etc can be available.
4.Lastly we are using RS232c cable for PC interface. We wish to display

a few details like pin number and the real time clock n the PC in the simplest way. Please suggest ways to go about it. some have suggested Visual Basic. Are VB codes for such application availalbe on the internet?

We wait for positive response. Thanking you and with best regards, Adam Mashraqui. (on behalf of the group)

Reply to
adam

For commerical products, I would suggest ATmega88 and PowerPAD (schematic to layout).

For learnings, AT89C52, transistor level shifters, op-amp comparators (no ICs) and manual layouts (pick your gerber editor). That way, you will be happy not to use them again.

Reply to
linnix

The flood of postings (and private email) I see from Indian engineering students wanting other people to do their homework makes me very happy, because it reminds me that quantity is not quality, and the number of annual graduates in a field says nothing about the host country's ability to excel in the field.

Reply to
zwsdotcom

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.