Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

ATmega Hard UART Polarity

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive
View previous topic :: View next topic  
Author Message
gmcge

Bascom Member



Joined: 16 Mar 2007
Posts: 9

canada.gif
PostPosted: Thu Oct 25, 2012 6:32 pm    Post subject: ATmega Hard UART Polarity Reply with quote

Hello

Is there a way to invert the serial data using the hard UART in the ATmega (168 specifically)?

Thanks!
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5922
Location: Holland

blank.gif
PostPosted: Thu Oct 25, 2012 9:33 pm    Post subject: Reply with quote

not that i know off. only sw uart can do that.
you could best add a transistor to invert the signal.
or use for example pcint to invert the signal. but then you will need other pins.

_________________
Mark
Back to top
View user's profile Visit poster's website
gmcge

Bascom Member



Joined: 16 Mar 2007
Posts: 9

canada.gif
PostPosted: Thu Oct 25, 2012 11:39 pm    Post subject: Reply with quote

Thanks Mark.

As I suspected. I implemented a soft UART and that is working fine for me.

-G
Back to top
View user's profile
JC

Bascom Member



Joined: 15 Dec 2007
Posts: 586
Location: Cleveland, OH

usa.gif
PostPosted: Thu Oct 25, 2012 11:48 pm    Post subject: Reply with quote

I am glad you solved your problem.

Another option is to switch to the Xmega micros.
One can set a flag to invert any I/O pin's output in hardware.

JC
Back to top
View user's profile Visit poster's website
heizer74

Bascom Member



Joined: 17 Jan 2006
Posts: 70

germany.gif
PostPosted: Sat Oct 27, 2012 2:32 pm    Post subject: Reply with quote

done that for infraredtransmission by using o logiclevel fet BSN20 in my project.
Back to top
View user's profile
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    www.mcselec.com Forum Index -> BASCOM-AVR Archive All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum