f4dtr 16 Posted April 9, 2013 Share Posted April 9, 2013 Hi Guy !I trying to programming an emulator of UV-PROM with the Stellaris Launchpad.and, i have a problem with use port.I probably not understand the concept. please help me !I use #define for "replacement" of lot of commands : // like P2OUT on MSP430 ? #define BUSDATA GPIO_PORTB_BASE //(like P2DIR =B00000000 ?) #define BUSDATA_HIGHZ ROM_GPIOPinTypeGPIOInput(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 ); //(like P2DIR =B11111111 ?) #define BUSDATA_OUTPUT ROM_GPIOPinTypeGPIOOutput(GPIO_PORTB_BASE, GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 | GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 ); I'd like write an octet on one step for the data bus (PORTB), and, after, i toggle this bus on high impedance (input state). there is a another method for put port in input or output state ? // Data bus in output state. BUSDATA_OUTPUT; // Send DATA While Output_Enable/Chip_Enable == 0 BUSDATA = Eprom[addr]; // like P2OUT = Octet in MSP430.... // byte Eprom[size_of_eprom]; // int addr; //index in Eprom array. // after : // Data bus in HighZ (input state). BUSDATA_HIGHZ; i've an error of compilation in BUSDATA = Eprom[addr]; => "error: lvalue required as left operand of assignment" and, i don't sure of my syntax for put PORTB in output/input... can you help me please ? thank you ! JY. ps:sorry for my english, it's bad, but i working for increase my level. Quote Link to post Share on other sites
energia 484 Posted April 11, 2013 Share Posted April 11, 2013 You will probably get a better audience for your questions over at the Stellaris forums: http://forum.stellarisiti.com Quote Link to post Share on other sites
f4dtr 16 Posted April 11, 2013 Author Share Posted April 11, 2013 Thanks, i go read this another forum.i'm looking for an another solution, or, if not, i must read a new time the datasheet...but GPIO paragraph is not clear for me (my bad english, maybe...)Energia is a wonderfull program, the hardware abstract level is very comfortable.i was hoping use my stellaris with a minimum effort. but it's not totaly true. logic !the magic commands don't exist maybe..hum. Why there is no command (in arduino/energia) to toggle the state of a port at one time ? mystery ! thanks for reading,best regards,JY Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.