Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

Atxmega2E5 USART enable / disable ?

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
kulisek

Bascom Member



Joined: 04 Jul 2006
Posts: 51

blank.gif
PostPosted: Mon May 04, 2015 12:58 pm    Post subject: Atxmega2E5 USART enable / disable ? Reply with quote

Hi,

At Atxmega32E5 I need sometimes in program to use PORTD.3 for other putpose. When I use Usartd0_ctrlb = &B00000000 then I disable USART but pin is in low state and I can not
set it to high level. When I use Usartd0_ctrlb = &B00001000 (TXEN) then USART is not active. Where is problem ?

Thanks

(BASCOM-AVR version : 2.0.7.8 )
Back to top
View user's profile
albertsm

Administrator



Joined: 09 Apr 2004
Posts: 5921
Location: Holland

blank.gif
PostPosted: Mon May 04, 2015 9:07 pm    Post subject: Reply with quote

usartd0_ctrlb.3=0 'disable TX
config PORTD.3=output
portd.3= someState

and to re-enable, just write ctrlb bit 3 to 1.

_________________
Mark
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR 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