Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

XMEGA128D4: MISO Port as GPIO possible?

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

Bascom Member



Joined: 23 Jul 2007
Posts: 30

blank.gif
PostPosted: Wed Jan 17, 2018 2:41 pm    Post subject: XMEGA128D4: MISO Port as GPIO possible? Reply with quote

Hi friends,

I use Hardware SPI on XMEGA128D4 to drive tft display.

Code:

Const Spdata = SpiC_data                            
Const Spstatus = SpiC_status
Config PortC.4 = Output                              
Portc.4 = 1
PortC_pin6ctrl = &B00_011_000
Config SpiC = Hard , Master = Yes , Mode = 0 , Clockdiv = Clk2 , Data_order = Msb , Ss = None
Open "SPIC" For Binary As #10
 


Now I want to use soft-SPI on pin C6 ...

Code:

      PortC.6 = 1
      porte.0 = 0
      Shiftin PinD.1 , PortC.6 , testword , 0 , 16 , 10
     print testword
      porte.0 = 1
 


didnt work... I already made "config portc.6=Output" but I have no luck...

Is their a possibility to use C6 or should I use other portpin for that?

BR

(BASCOM-AVR version : 2.0.8.1 )
Back to top
View user's profile
MWS

Bascom Member



Joined: 22 Aug 2009
Posts: 1544

blank.gif
PostPosted: Wed Jan 17, 2018 10:24 pm    Post subject: Re: XMEGA128D4: MISO Port as GPIO possible? Reply with quote

boeseturbo wrote:
Master = Yes , Mode = 0
testword , 0

Seems not to be equivalent.
Back to top
View user's profile
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