Mega64 Pins 23,27,28 out only 2.5 volts

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am using ATmega64 for serial communication. Based on the schematics(attached below) I have connected all the VCC and AVCC pins to 5V and all the GND pins to ground. I have placed decoupling capacitors of 100nF at each of those VCC and GND pins combined and all those have common ground and VCC. I have burned my code to print serial data and everything is working fine, I am using FT232R breakout board for the serial communication. Here are my connections details for reference(although it's trivial, please correct me if I am wrong). Problem is that Pins 23,27,28 are supplying out only 2.5 volts instead of 5V even when I activated those.

 

Pin 21,52,64 to VCC

Pin 22,53,63 to GND

Pin 62(AREF) to GND via 100nF capacitor

External 16MHz crystal oscillator output to pin 24, for SAME REASON pin 23 isn't supplying out 5V so I connected the other end of the Crystal oscillator to VCC directly and it's also working fine in that case. 

 

M64 pin 2,3 also works as Rx and Tx pins and they are working well when I connect it to the FT232R for serial communication but when I used pin 27,28 which are also Rx and Tx pins, they aren't working, in fact low voltage of ~2.5V is being produced out of those pins, while pin 2 and 3 gives out 5V as expected and working well. 

 

I have measured voltages across all those pins and problem is pin 27,28 aren't producing enough voltage to the output. I even tried to activate pin 25 and when I checked its output is ~2.5V but it should be 5V. 

 

My fuse settings are as follows, lfuse-0xDA hfuse-0x98 efuse-0xFD. so my problem is that Pins 23,27,28 are supplying out only 2.5 volts instead of 5V even when I activated those. Thanks in advance. 

Attachment(s): 

Last Edited: Wed. Nov 29, 2017 - 11:11 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gak543 wrote:

I am using ATmega64 for serial communication.

 

So you chose to wake up a 10 year old thread about an ATmega16 to place your post in?  I hope a nice moderator gives your post a new home.

 

I am looking into your problem.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Wed. Nov 29, 2017 - 10:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

 

Read page 171 of the latest datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-2490-8-bit-AVR-Microcontroller-ATmega64-L_datasheet.pdf

 

Dual USART The ATmega64 has two USART’s, USART0 and USART1. The functionality for both USART’s is
described below. USART0 and USART1 have different I/O Registers as shown in “Register
Summary” on page 392. Note that in ATmega103 compatibility mode, USART1 is not available,
neither is the UBRR0H or UCRS0C registers. This means that in ATmega103 compatibility
mode, the ATmega64 supports asynchronous operation of USART0 only.

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Wed. Nov 29, 2017 - 10:48 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, I was looking for posts which are close to my problem, I am posting on other threads too which are closely relevant. Thanks for your response. 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gak543 wrote:

Well, I was looking for posts which are close to my problem, I am posting on other threads too which are closely relevant. Thanks for your response. 

 

Better not to wake the dead.  Page 39 of the same datasheet, you are using a crystal oscillator not a quartz crystal.

Crystal Oscillator XTAL1 and XTAL2 are input and output, respectively, of an inverting amplifier which can be configured
for use as an On-chip Oscillator, as shown in Figure 19. Either a quartz crystal or a ceramic resonator may be used.

 

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Wed. Nov 29, 2017 - 10:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gak543 DO NOT keep on hijacking other people's post with the same questions, I have split your post.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

Last Edited: Wed. Nov 29, 2017 - 11:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In a previous post of yours in another thread https://www.avrfreaks.net/comment/2328161#comment-2328161 you wrote

 

I have tried to include the m103 compatibility also

​You want to exclude that compatibility.

 

You should read the datasheet and pay more attention to the answers that the others have given.

 

​EDIT: verbage

"I may make you feel but I can't make you think" - Jethro Tull - Thick As A Brick

"void transmigratus(void) {transmigratus();} // recursio infinitus" - larryvc

"It's much more practical to rely on the processing powers of the real debugger, i.e. the one between the keyboard and chair." - JW wek3

"When you arise in the morning think of what a privilege it is to be alive: to breathe, to think, to enjoy, to love." -  Marcus Aurelius

Last Edited: Thu. Nov 30, 2017 - 02:44 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote: 

Well, I was looking for posts which are close to my problem, I am posting on other threads too which are closely relevant.

 That is almost as bad as screaming for code. Spraying posts around is called "cross-posting" and will earn you many bad comments.

 

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gak543 wrote:
Based on the schematics(attached below) I have connected all the VCC and AVCC pins to 5V and all the GND pins to ground.

I only see "Pin Configuration" attached.  The first obvious question is:  What is attached to the pins in question?

 

As hinted, any level checking on pin 23 is suspect.  On this ancient model it is only XTAL2 and not a GPIO if not used as clock as on some newer models.  So if part of a crystal circuit, hmm--indeed with full-swing and a reading with an averaging voltmeter with decent source impedance it might indeed read about 1/2 Vcc.  Confirm your fuse settings and clock source.

 

As you mentioned, alternate functions of pin 27 and pin 28 include RXD1 and TXD1.  Show a complete test program that exhibits the symptoms.  Tell what is connected to the pins.  Tell how you are measuring.

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I tried to include the m103 compatibility based on a suggestion by another member of the group for my previous post, my m64 and FTDI weren't performing serial communication due to fuse settings confusion. Well, I will surely try to exclude it and try to do as you said. As suggested by others, I will go through the datasheet more clearly. Thank you and my apologies.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies, I am quite new to this community and I am trying to learn from my mistakes. I will make sure not to do the same mistake again. Thanks for your suggestion.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My apologies, I will make sure it won't happen again. Thank you for the heads-up.