Forum - MCS Electronics
View previous topic :: View next topic
Author
Message
boeseturbo Joined: 23 Jul 2007 Posts: 46
Posted: Wed Jan 17, 2018 2:41 pm Post subject: XMEGA128D4: MISO Port as GPIO possible?
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
MWS Joined: 22 Aug 2009 Posts: 2262
Posted: Wed Jan 17, 2018 10:24 pm Post subject: Re: XMEGA128D4: MISO Port as GPIO possible?
boeseturbo wrote: Master = Yes , Mode = 0
testword , 0
Seems not to be equivalent.
Back to top
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