The Godfather talking
You think I am funny guy huh?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 19, 2024, 09:40:21 09:40


Login with username, password and session length


Pages: 1 [2]  All
Print
Author Topic: MCU serial communication with Hyper Terminal....... Need Help  (Read 11528 times)
0 Members and 1 Guest are viewing this topic.
Ichan
Hero Member
*****
Offline Offline

Posts: 833

Thank You
-Given: 312
-Receive: 392



WWW
« Reply #25 on: November 08, 2009, 04:19:14 16:19 »

So the serial communication already work without the AVR in place?

The fuse setting will depends on your HW and SW configuration (oscilator, frequency, watchdog, etc.), you need to examine the datasheet.

-ichan

Edit: I just realize that you want to build Elm Chan Servo Motor Controller, there is long thread about this on cnczone forum http://www.cnczone.com/forums/showthread.php?t=17726
« Last Edit: November 08, 2009, 04:31:27 16:31 by Ichan » Logged

There is Gray, not only Black or White.
abcsantosh
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 33
-Receive: 3


« Reply #26 on: November 10, 2009, 01:00:05 13:00 »

Hi Ichan, you are right. I am trying to build the servo controller. Serial communication is now ok. (As per loopback test)

 But I am confused because, when I placed the AVR in place and tried to start the communication, why the characters are not readable ? I am trying to understand and find out which is the reason for this. Fuse settings or any hardware bug ? Also one another point, during this port testing period, I lost several max232 devices. That's why I am so worried about this. After each successful loopback test, one Max232 died out. What's the reason ?
    
Have a nice day
« Last Edit: November 10, 2009, 03:17:42 15:17 by abcsantosh » Logged
cncbasher
Junior Member
**
Offline Offline

Posts: 91

Thank You
-Given: 107
-Receive: 51


« Reply #27 on: November 10, 2009, 01:07:48 13:07 »

do not have the avr cpu chip connected
follow instructions to loopback from the pc and only connect txd & rxd pins together at the avr chip socket with chip not in circuit
with the chip connected you will not get the same results .

we need to know that the max232 is connected correctly before moving on to the avr code etc

if you are killing the max 232 devices you have something connected wrong , or connecting pins to wrong voltage
do not change connections with the development still powered up , always power down





Logged
cncbasher
Junior Member
**
Offline Offline

Posts: 91

Thank You
-Given: 107
-Receive: 51


« Reply #28 on: November 10, 2009, 02:43:30 14:43 »

see this link for a avr fuse calculator , this makes it easier to understand
http://www.engbedded.com/cgi-bin/fcx.cgi?P_PREV=ATtiny2313&P=ATtiny2313&M_LOW_0x3F=0x08&M_LOW_0x80=0x00&M_HIGH_0x0E=0x0E&M_HIGH_0x20=0x00&B_CKDIV8=P&B_SPIEN=P&B_SUT0=P&B_CKSEL3=P&B_CKSEL1=P&B_CKSEL0=P&V_LOW=64&V_HIGH=DF&V_EXTENDED=FF

the only option you need to change from the default is to use an external crystal
instead of the default rc osc




Posted on: November 10, 2009, 03:15:20 15:15 - Automerged

here's pony prog fuse settings ,
use 16Mhz crystal
Logged
abcsantosh
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 33
-Receive: 3


« Reply #29 on: December 04, 2009, 03:17:43 15:17 »

Hi all, I am back with the same problem. :-) In meantime I had done a lot of things regarding this project. Like new pcb. Learning to program avr. etc.

Anyway, the avr is now programmed correctly and working fine as green led lit up. Also serial comm. is ok as per loop back test. Now I have connected the circuit to serial port and trying to see any message in Hyper terminal. I got these strange characters which is attached below in file. I tried with Termite software also but I received strange characters only. Comm port settings are same as suggested with program.(38400, 8, N,  1)  

Guide me, and have a nice day  
« Last Edit: December 04, 2009, 03:20:23 15:20 by abcsantosh » Logged
cncbasher
Junior Member
**
Offline Offline

Posts: 91

Thank You
-Given: 107
-Receive: 51


« Reply #30 on: December 04, 2009, 07:25:06 19:25 »

you should obtain three Huh on the serial port , i would guess that the terminal application is not configured correctly , or using the correct ascii code set etc ,

Logged
Ichan
Hero Member
*****
Offline Offline

Posts: 833

Thank You
-Given: 312
-Receive: 392



WWW
« Reply #31 on: December 04, 2009, 08:52:35 20:52 »

Some other thoughts:
- Wrong baud rate: check osc x'tal, cap, and fuse setting.
- uC  reset occasionally: check watchdog setting, reset pin, decoupling cap.
- Noise: check grounding, disconnect power section, try to power the circuit with 9v battery
- Broken comm port: try other pc, or maybe try other usb-serial interface if you use it.

Good luck - don't give up!

-ichan.

PS: try to add 4K7 pull-up resistor on reset pin.
« Last Edit: December 04, 2009, 09:42:14 21:42 by Ichan » Logged

There is Gray, not only Black or White.
abcsantosh
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 33
-Receive: 3


« Reply #32 on: December 05, 2009, 06:45:23 06:45 »

Hi all, tell me one thing. If I connect oscilloscope probe to xtal pins of attiny2313, what peak-peak voltage of frequency generated by xtal, should I get. When I checked, the voltage I got is 500mV peak-peak and 16MHz frequency. (My Xtal connected is 16 MHz) Is it right ? I only want to confirm, if avr and xtal is working fine

Have a nice day
« Last Edit: December 05, 2009, 06:48:37 06:48 by abcsantosh » Logged
0815achim
Junior Member
**
Offline Offline

Posts: 50

Thank You
-Given: 224
-Receive: 25


« Reply #33 on: December 07, 2009, 07:03:11 07:03 »

I'm not a pro in programming Micros, but what i see is that tho project abcsantosh try's to build is for a AT90S2313 and he uses a ATTiny2313.
Eventual he has to do some changes on the sourcecode?

Greetings...   0815achim


Posted on: December 07, 2009, 07:42:54 07:42 - Automerged

Sorry i looked at the wrong Projekt!
There are two versions of the projekt, one with a 90s2323 and one with a attiny2313.
But at the screenshots of abcsantosh it looks like a problem with the settings of the serial port, becaus he has some kind of communication.
@abcsantosh A the powerup of the ciruit, did you always gat the same "startup message"?
If yes, then i think it's not a problem of noise, broken comport or a fault in the circuit.

Greetings...  0815achim
Logged
mrpicing
Junior Member
**
Offline Offline

Posts: 56

Thank You
-Given: 133
-Receive: 33


« Reply #34 on: December 09, 2009, 09:54:00 09:54 »

Have you connected the de-coupling capcitor with max232. I have faced same problem some time ago.
After wasting some time i found that there was no de-coupling capacitor between PIN#15,16 of Max232.
Remove controller, short rxd,txd and then check comm.
Logged
abcsantosh
Junior Member
**
Offline Offline

Posts: 57

Thank You
-Given: 33
-Receive: 3


« Reply #35 on: December 09, 2009, 05:32:59 17:32 »

mrpicing , I have already checked it. Also the loopback test is working fine.

Hi all, Is there any possibility, that the MCU is not programmed properly or eeprom. 
Logged
Ichan
Hero Member
*****
Offline Offline

Posts: 833

Thank You
-Given: 312
-Receive: 392



WWW
« Reply #36 on: December 09, 2009, 05:41:28 17:41 »

Yes, there is the possibilities that the programmer didn't write the fuse correctly, i just don't remember which one which..

-ichan
Logged

There is Gray, not only Black or White.
Pages: 1 [2]  All
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC