microcontroller help

Thread Starter

s3b4k

Joined Feb 15, 2010
38
I need help with this, microcontroller is Atmega 8

I have two problems

1. My teacher said first that the switches will not work due to a semiconductor technology in the microcontroller. How do i fix this
2.Next there is a problem with the reset with the isp connector. How do i fix that?
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
I don't see offhand what's wrong with the S1 and S2 connection. You have 10k pull-up resistors to +5v, and the switches are there for overriding the pull-up resistors, putting 0v on the inputs. Perhaps your instructor is considering switch bounce, as you have not defined to us what the purpose of the switches are. If it's for counting or the like, you will need some kind of de-bouncing circuit.

You have the ISP connector's RESET input grounded. Shouldn't that go to the RESET on the uC?
Where is the SCLK supposed to go? Not to ground, certainly.
Where is the MISO supposed to connect? Not to ground, either.
You have pin 3 on the ISP not connected to anything. I don't know, but should that be ground?
 

Thread Starter

s3b4k

Joined Feb 15, 2010
38
i didnt show you the complete diagram, and the switch buttons are used to blink leds. i uploaded full schematic. ignore the other parts of the diagram i just need help with those two, i know the rest of my errors. also can you tell me why everyone uses 10 k ohm there what is that significance
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Maybe you should ask your teacher if their objection to the switch/resistor connection has something to do with switch bounce.

The ATmega 8 is a CMOS device. 10k is a very common value for pull-up and pull-down resistors for CMOS devices. It's enough to pull an input up or down, and a CMOS output can override it.



Did you know that you had R7 through R9 mirror imaged? Also, you ought to not have MISO and MOSI so close to the SCLK line; it makes things a bit confusing.
 

Thread Starter

s3b4k

Joined Feb 15, 2010
38
alright thanks man, do you need a pullup resistor for the reset on the isp connector to the microcontroller
 

SgtWookie

Joined Jul 17, 2007
22,230
On a PIC, you need the MCLR pin pulled to Vcc by a 10k resistor. The programmer raises that pin higher for programming. I don't know what the ATMega 8 requires. You'll need to look at the programming specifications.
 

hgmjr

Joined Jan 28, 2005
9,027
I need help with this, microcontroller is Atmega 8

I have two problems

1. My teacher said first that the switches will not work due to a semiconductor technology in the microcontroller. How do i fix this
2.Next there is a problem with the reset with the isp connector. How do i fix that?
I agree with Sgtwookie's comment concerning the hookup of the switches. I don't understand the comment from your teacher. I have connected switches in the same way you have on several AVR micrcontrollers and they work fine.

As for the ISP connector, I see you have chosen the ISP10PIN version. It uses a dual row 10 pin connector. It appears to be wired per the ATMEL standard.

Here is a link to an example of the ISP10PIN connector wiring.

hgmjr
 

t06afre

Joined May 11, 2009
5,934
I think it is wrong of your teacher to say your switch setup want work. But switches that are not debounced may in some settings give unwanted behavior. As an example. A push of a button that was meant to indicate one occurrence, may in some cases be counted as several events. It will be up to the designer to evaluate if this may cause problems or not. And you can also debounce a switch in software. That is not a problem. I think this answer was more educational correct, than saying "It will not work"
I found this quite interesting in order cast some light on the problem
http://www.ganssle.com/debouncing.htm
 
Last edited:

SgtWookie

Joined Jul 17, 2007
22,230
Rather than just adding a capacitor, look at figure 3 on the 2nd page that t06afre linked to.

It's not a good idea to short across a capacitor with a switch directly, as it will tend to burn the switch contacts. The above referenced circuit has a resistor in the discharge path, which will make the peak switch current much lower.
 

MrChips

Joined Oct 2, 2009
30,621
The ATmega8 I/O pins have internal pullups. To enable the pullup for an individual pin, set the direction to input and write a 1 to the output.

The RESET pin already has pullup. There is no need for external RESET circuitry.
 

Thread Starter

s3b4k

Joined Feb 15, 2010
38
thanks for all the help but i got another two questions: it would mean a lot if you can help.

1.you see the 10k resistor in the figure, what is the min and max value this can be on the micro-controller?

2. is in the attached file. Basically can you put a check or an x i.e(√ or x)
if it can operate in the region or not(high or low)

thank you
 

Attachments

SgtWookie

Joined Jul 17, 2007
22,230
What is shown as the "Bad Region" is actually called the "indeterminate region", that area where the signal is neither a logic "1" nor "0"; a non-Schmitt trigger input won't be certain to be set correctly - the output can be incorrect.

Since I'm not familiar with Atmel 8's, perhaps someone else will help you with the rest.
 

Thread Starter

s3b4k

Joined Feb 15, 2010
38
What is shown as the "Bad Region" is actually called the "indeterminate region", that area where the signal is neither a logic "1" nor "0"; a non-Schmitt trigger input won't be certain to be set correctly - the output can be incorrect.

Since I'm not familiar with Atmel 8's, perhaps someone else will help you with the rest.
alright thanks man
 
Top