Continue to Site

Welcome to EDAboard.com

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

attiny2313 serial interface with baudrate 115200

Status
Not open for further replies.

acus

Junior Member level 1
Junior Member level 1
Joined
Sep 7, 2005
Messages
17
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,281
Activity points
1,402
attiny2313 set baudrate

pleasee anyone help me.. i want to build project wih attiny2313 serial comunication with baudrate 115200 heres some example:

$regfile = "attiny2313.dat"
$crystal = 20000000

$baud = 115200

Dim Cr As Byte
Cr = &H0D


Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0

Waitms 5

Print "acus kasep pisan" ; Chr(cr);

End

i have test with avr simulator and works fine but if i conect with pc (hyperterminal) it's not working. the result is not "acus kasep pisan"

any solution...? i try with crystal external 4mhz,20mhz still not working...
 

attiny crystal baud

acus said:
pleasee anyone help me.. i want to build project wih attiny2313 serial comunication with baudrate 115200 heres some example:

$regfile = "attiny2313.dat"
$crystal = 20000000

$baud = 115200

Dim Cr As Byte
Cr = &H0D


Config Com1 = 115200 , Synchrone = 0 , Parity = None , Stopbits = 1 , Databits = 8 , Clockpol = 0

Waitms 5

Print "acus kasep pisan" ; Chr(cr);

End

i have test with avr simulator and works fine but if i conect with pc (hyperterminal) it's not working. the result is not "acus kasep pisan"

any solution...? i try with crystal external 4mhz,20mhz still not working...

hi!
you should consider that it should be a good relation beetwen the frequency of the
micro and baudrate to get minimum errorrate ,with freq of 4 or 8 or 16 or 20 Mhz
we have more than 7% percent error and more than 1% is not acceptable,
try using external crystal of 11059200 hzs nearly i'm sure you would get right answer
goodluck!
 

interface attiny 2313

I think it is the problem with fuse bits. Default frequency of most of atmega uC are 1mhz, so if you are using 115.2kbps, see the error. If it is .2% then it is ok. Read fuse bits and program fuse bits for external crystal. Since it is not working for 4mhz and 20mhz, it is almost sure that fuse bits is the problem. See this link to know about setting fuse bits
**broken link removed**


Bibin John
www.bibinjohn.tk
 

attiny2313 byte from pc

Using a UBBR value of 20 or 21 you will get 119,048 baud or 113,640 baud.
The 11.0592 MHz crystal mentioned above will give you exactly 115,200 baud.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top