Pages: [1]   Go Down
Author Topic: Atmega644P Second Serial port  (Read 913 times)
0 Members and 1 Guest are viewing this topic.
Western Australia
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am using a ATmega644P and would like have a second serial port.
The device has one but I can not see how to "use" it. (Pins 16 = RX1, pin 17 = TX1)
 
Have used "softserial" but while the Tx works on the 644, the Rx on ANY pin I program does not?
I have used softserial on my Duemilanove and it works, I just ran out of program space, so migrated to the 644.
I am using Sanguino 644 8MHz  for the "Board"
Can any one advice pls.

Also can some point me to a "table" that lists what the letters mean after the ATmega chips, P/PU/V/A etc

Thanks
Logged

SE USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

does serial1 work (keeping in mind the first port is Serial0)

for instance

Serial1.read()
Logged


Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16506
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

does serial1 work (keeping in mind the first port is Serial0)

for instance

Serial1.read()

I recall testing the serial1 port on my 644P when I got the board first working and the second serial port worked with my simple tests.

 Keep in mind that the 644 non-P model does not contain the second hardware serial port.

Lefty
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23669
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

"Also can some point me to a "table" that lists what the letters mean after the ATmega chips, P/PU/V/A etc"
That can be found in the datasheets.
In general, the first part:
Atmega644, 644A, 644P, 644PA,
The P stands for Pico power, while the A refers to an update,
and -PU, -AU, -MU, etc. refers to the packaging. DIP, quad flat pack, leadless, ball grid array, etc.

http://www.atmel.com/products/microcontrollers/avr/megaAVR.aspx
...select "microcontroller selector" for a parametric kind of search....

...or, try this one...
AVR Product Finder

...or, for those with a mobile phone...


http://www.atmel.com/v2PFResults.aspx#(actives:!(8238,8394,8362,8282,8431,8300,8358,8392,8378,8445,8236,8449,8474,8248,8264,8447,8256,8254,8286,8462,8429,8458,8466,8400,8302,8278),data:(area:'',category:'34864[33180[33085]]',pm:!((i:8238,v:!(4,14)),(i:8394,v:!(4,12)),(i:8362,v:!(5,6)),(i:8282,v:!(1)),(i:8431,v:!(5,22)),(i:8300,v:!(4,8)),(i:8358,v:!(10,47)),(i:8392,v:!(0,1)),(i:8378,v:!n),(i:8445,v:!(4,5,8)),(i:8236,v:!(7,12)),(i:8449,v:!(1,6)),(i:8474,v:!(0)),(i:8248,v:!(0,1)),(i:8264,v:!(1,4)),(i:8447,v:!(0,1)),(i:8256,v:!(1)),(i:8254,v:!(6,11)),(i:8286,v:!(0,1)),(i:8462,v:!(0,4)),(i:8429,v:!(1,5)),(i:8458,v:!(0,1)),(i:8466,v:!(1,2,4)),(i:8400,v:!(2,12)),(i:8278,v:!(1))),view:table),sc:1)

Edit: re-updated the link  smiley-grin
« Last Edit: March 27, 2013, 12:05:04 am by Coding Badly » Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16506
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That second link is ugly looking and doesn't work.

Lefty
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23669
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Updated the link.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Western Australia
Offline Offline
Newbie
*
Karma: 1
Posts: 48
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi
Thanks for the all your prompt reply's.
"Serial1".worked, but funny enough when I use "Serial0". it does not compile...
But "Serial." does, thanks anyway, system working, so I can move on.
"Letters" after chip number, thanks for the list.
Not sure about if "no 2nd serial" if P is missing thou.....

Best regards
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 437
Posts: 23669
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, Serial, Serial1, and for Mega, Serial2, Serial3.

Atmega644: only 1 UART
http://www.atmel.com/devices/ATMEGA644.aspx?tab=parameters

Atmega644A: 2 UART
http://www.atmel.com/devices/ATMEGA644A.aspx?tab=parameters

Atmega644P: 2 UART
http://www.atmel.com/devices/ATMEGA644P.aspx?tab=parameters

Atmega644PA: 2 UART
http://www.atmel.com/devices/ATMEGA644PA.aspx?tab=parameters

Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

UK
Offline Offline
God Member
*****
Karma: 17
Posts: 568
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought I remember reading somewhere that the reference to no second serial port on the non-P 644 was an error and it does in fact have a second UART.

I keep meaning to get my 644P's and 644's bootloaded and actually prove it true or false, unless someone else can confirm.
« Last Edit: March 27, 2013, 07:33:13 pm by tack » Logged

Left Coast, CA (USA)
Online Online
Brattain Member
*****
Karma: 331
Posts: 16506
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I thought I remember reading somewhere that the reference to no second serial port on the non-P 644 was an error and it does in fact have a second UART.

I keep meaning to get my 644P's and 644's bootloaded and actually prove it true or false.

The Atmel datasheets are pretty clear on the matter. From the 644 datasheet:

Quote
The ATmega644 has one USART, USART0.

I've got a optiboot version hex file that works on the 644 chip:

optiboot_atmega644p-4-5.hex

Code:
:020000000504F5
:10FC0000112484B714BE81FFF2D085E08093810077
:10FC100082E08093C00088E18093C10086E08093F9
:10FC2000C20080E18093C4008EE0CBD0209A86E0B1
:10FC300020E33CEF91E0309385002093840096BB55
:10FC4000B09BFECF189AA8958150A9F7CC24DD244B
:10FC500088248394B5E0AB2EA1E19A2EF3E0BF2E69
:10FC6000A4D0813471F4A1D0082FB1D0023811F49E
:10FC700085E005C0013811F484E001C083E08DD037
:10FC800089C0823411F484E103C0853419F485E01D
:10FC9000A6D080C0853579F488D0E82EFF2485D0A1
:10FCA000082F10E0102F00270E291F29000F111F09
:10FCB0008ED068016FC0863521F484E090D080E05A
:10FCC000DECF843609F040C070D06FD0082F6DD0E1
:10FCD00080E0C81680EED80618F4F601B7BEE895A5
:10FCE000C0E0D1E062D089930C17E1F7F0E0CF16C5
:10FCF000F0EEDF0618F0F601B7BEE89568D007B65B
:10FD000000FCFDCFA601A0E0B1E02C9130E01196FF
:10FD10008C91119790E0982F8827822B932B129625
:10FD2000FA010C0187BEE89511244E5F5F4FF2E0A7
:10FD3000A030BF0751F7F601A7BEE89507B600FC53
:10FD4000FDCF97BEE89526C08437B1F42ED02DD0D4
:10FD5000F82E2BD03CD0F601EF2C8F010F5F1F4FF8
:10FD600084911BD0EA94F801C1F70894C11CD11CFE
:10FD7000FA94CF0CD11C0EC0853739F428D08EE10F
:10FD80000CD086E90AD08AE07ACF813511F488E078
:10FD900018D01DD080E101D063CF982F8091C00092
:10FDA00085FFFCCF9093C60008958091C00087FF27
:10FDB000FCCF8091C00084FD01C0A8958091C60051
:10FDC0000895E0E6F0E098E1908380830895EDDF08
:10FDD000803219F088E0F5DFFFCF84E1DECF1F939A
:10FDE000182FE3DF1150E9F7F2DF1F91089580E04B
:08FDF000E8DFEE27FF2709946C
:040000030000FC00FD
:00000001FF


And the boards.txt entry to add a 644P with optiboot support:

Code:
##############################################################


bobuino644.name=Bobuino 644P optiboot
bobuino644.upload.protocol=arduino
bobuino644.upload.maximum_size=63488
bobuino644.upload.speed=115200
bobuino644.bootloader.low_fuses=0xff
bobuino644.bootloader.high_fuses=0xdc
bobuino644.bootloader.extended_fuses=0xfd
bobuino644.bootloader.path=optiboot
bobuino644.bootloader.file=optiboot_atmega644p-4-5.hex
bobuino644.bootloader.unlock_bits=0x3F
bobuino644.bootloader.lock_bits=0x0F
bobuino644.build.mcu=atmega644p
bobuino644.build.f_cpu=16000000L
#bobuino644.build.core=arduino:arduino
bobuino644.build.core=standard
bobuino644.build.variant=bobuino

##############################################################

Lefty
Logged

Pages: [1]   Go Up
Jump to: