Pages: [1]   Go Down
Author Topic: RE: Default Rx / Tx Shouldn't this be changed?  (Read 643 times)
0 Members and 1 Guest are viewing this topic.
Chennai, India
Offline Offline
God Member
*****
Karma: 0
Posts: 752
Peace!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Is there a specific reason why Rx and Tx are connected to pin 0 & pin 1 by defualt? why not move them to pin 12 &13? Recently i've run into a couple of devices that take/give 8 bit parallel data(encoders/decoders) and i think having complete access to PORTD with no disturbance to Serial Monitoring would be of great help. I know i can use a Shiftout / Shiftin Register to tackle this but I think a feature on the board would help a lot. perhaps my next design is gonna have this smiley-wink Finally will simply changing the rx/tx lines on the pcb layout do the trick or should i play around with the bootloader/Arduino IDE aswell?
« Last Edit: March 04, 2009, 12:03:16 pm by pracas » Logged

Be The Change...

Connecticut, US
Offline Offline
Edison Member
*
Karma: 2
Posts: 1036
Whatduino
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The support for hardware serial is not defined by the printed circuit board, but by the ATmega8, ATmega168, ATmega328 design itself.  The only way to change these would be to ask Atmel to design the next chip differently.

http://www.atmel.com/dyn/resources/prod_documents/doc2545.pdf

Please familiarize yourself with the capabilities of the chip.  "Programmable USART" is mentioned many times, and refers to the hardware serial interface.

All of the specialized I/O features overlap with various general I/O pins.  Such is the nature of the microcontroller line.  They wanted the maximum flexibility with the minimum pin count.  Pins dedicated to just one feature are costly.
« Last Edit: March 04, 2009, 12:20:13 pm by halley » Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It's not a big deal, you can combine PORTD and PORTB easily, say pins 2-9 (not tested  smiley-wink):
to read:
readbyte = (PORTD >> 2) | (PORTB << 6);

to write:
PORTD = (PORTD & 3) | (writebyte << 2);
PORTB = (PORTB & 0xfc) | (writebyte >> 6);

It's not as neat as PORTD = writebyte, but still fine =)
Logged

Chennai, India
Offline Offline
God Member
*****
Karma: 0
Posts: 752
Peace!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

oops halley, Thanks I didnt know that...  :-/ and all the while i was thinking it was something to do with arduino.

Thanks mekon, i can do that...
« Last Edit: March 04, 2009, 12:39:42 pm by pracas » Logged

Be The Change...

0
Offline Offline
Newbie
*
Karma: 0
Posts: 37
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

don't worry. happens to me all the time. But remember, compiler errors are usually coder's fault  smiley
Logged

Pages: [1]   Go Up
Jump to: