Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic 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.

Register Log in

ATMEGA8-16PI Strange Problem

Status
Not open for further replies.

sakaz

Junior Member level 1
Joined
May 23, 2007
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,468
atmega8-16pi

Hi friend,
I am in to strange problem could not understand yet. I have been working with ATMEL MCU ATMEGA8 with many projects using UART, SPI, i had no problem, but now recently, i bought few ATMEGA8 and using Internal Osc. 4Mhz but it is not working and ihave connected another device at SPI it is also not working. the MCU TX / RX not working. But when i connect my old M8 it does work fine with same codes and schematic. I checked with the BASCOM using STK-300 programmer it shows different .Calbration Chip :

Calibration0 = B0
Calibration1 = B1
Calibration2 = AD
Calibration3 = AD

What are these calibration and the new MEGA8 are different calibration which are not working but older are working fine. My project is at the final stage and now i bught 10 Mega8 and they make same problem :(

I am looking forward your support soon.

Shan
 

abc123

Member level 4
Joined
Mar 28, 2002
Messages
74
Helped
3
Reputation
6
Reaction score
1
Trophy points
1,288
Activity points
575
atmega8 problme

try to use external crystal and verify the chip works with your old program. the internal OSC is not reliable for serial comm. they could have +-10% variations, and you need to calibrate it first.

Some Chinese avr web saying that the new M8 chip has larger variations now, (comparing to the old one). may be this is your problem. You can try to calibrate the chip first, or just use the external crystal.
 

sakaz

Junior Member level 1
Joined
May 23, 2007
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,468
problem working with atmega8

Hi,

Thanks for your reply and i think it is the problem. But would you please tell me how to calibrate the chip.

I have used the External Crystal 4MHz at Buad = 19200, it does communicate with mobile phone but:

1. Only receive does not Send data to the Mobile phone.
2. Device connected at SPI does not work. SPI clockrate = 64

What do you suggest me? Try to get another new ATEMGA8. Because my program is working fine with my Old Mega8. Actually the problem is that i will use ATEMGA16 for my further project and i need to prepare atleast 20 units so i am worry if they will have the same problem then it will problem for me.

Kindly help me.

REgards
Shan

Added after 1 hours 13 minutes:

Hi friend,

Thanks for your reply. One thing i want to tell you that i have used the Timer1 in my codes and timer1 setting is:

const Timer1Reload = 15625
config timer1=timer,prescale = 256
load timer1 , Timer1Reload
on ovf1 Timer1_isr
enable timer1
start timer1

and SPI clockrate = 64.

Do you think that Timer is making problem to control the SPI or i change the Timer1 setting.

Regards
shan
 

G

Guest

Guest
problem connect avr stk to atmega8

I had the same problem when I used internal osc. Not only with instability or should I say temperature dependance of the osc. frequency but also with the range of osc. frequencies from the same batch. Each uC had to be calibrated (the procedure is described at atmel site) and the change in temperature which was higher than 10 deegrees and I was facing the problems again ( have to recalibtrate) so I decided to use external osc.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top