Quantcast
Channel: Forums - Recent Threads
Viewing all articles
Browse latest Browse all 262198

Bit field manipulation of two output ports

$
0
0

Hi forum users,

my task is to send data from the MCU MSP430F6638 to the LCD Driver ILI9341 using the 8080-I 16-Bit parallel MCU interface. In other words, in order to write a pixel to my display I have to send 16-bit data using 16 output pins of the MCU.

Now, my problem is how can I do this bit field manipulation effectively. I have tried a forum solution but unsuccessfully:

  http://e2e.ti.com/support/microcontrollers/msp430/f/166/t/219088.aspx

This is what I have done taking into consideration the above link:

Linker Command File

P4OUT_bit:origin=0x223, length=0x0001;
P8OUT_bit:origin=0x263, length=0x0001;
P4OUT_bit:origin=0x282, length=0x0001;

dts028atft.h

extern volatile struct {
unsigned int pin0:1;
unsigned int pin1:1;
unsigned int pin2:1;
unsigned int pin3:1;
unsigned int pin4:1;
unsigned int pin5:1;
unsigned int pin6:1;
unsigned int pin7:1;
}P4OUT_bit;

extern volatile struct  {
unsigned int pin0:1;
unsigned int pin1:1;
unsigned int pin2:1;
unsigned int pin3:1;
unsigned int pin4:1;
unsigned int pin5:1;
unsigned int pin6:1;
unsigned int pin7:1;
}P8OUT_bit;

extern volatile struct  {
unsigned int pin0:1;
unsigned int pin1:1;
unsigned int pin2:1;
unsigned int pin3:1;
unsigned int pin4:1;
unsigned int pin5:1;
unsigned int pin6:1;
unsigned int pin7:1;
}P9OUT_bit;

#define DB0 P4OUT_bit.pin2
#define DB1 P4OUT_bit.pin3
#define DB2 P4OUT_bit.pin4
#define DB3 P4OUT_bit.pin5
#define DB4 P4OUT_bit.pin6
#define DB5 P4OUT_bit.pin7
#define DB6 P8OUT_bit.pin0
#define DB7 P8OUT_bit.pin5
#define DB8 P8OUT_bit.pin6
#define DB9 P8OUT_bit.pin7
#define DB10 P9OUT_bit.pin0
#define DB11 P9OUT_bit.pin1
#define DB12 P9OUT_bit.pin2
#define DB13 P9OUT_bit.pin3
#define DB14 P9OUT_bit.pin4
#define DB15 P9OUT_bit.pin5

Without changing the Symbol Management, I have got the following errors and Warnings:

Errors
errors encountered during linking; "Project_MSP430F6638.out" not built             Project_MSP430F6638    line 0    1366970122846    1807
unresolved symbol P4OUT_bit, first referenced in ./dts028atft_320x240.obj        Project_MSP430F6638    line 0    1366970122846    1804
unresolved symbol P8OUT_bit, first referenced in ./dts028atft_320x240.obj        Project_MSP430F6638    line 0    1366970122846    1805
unresolved symbol P9OUT_bit, first referenced in ./dts028atft_320x240.obj        Project_MSP430F6638    line 0    1366970122846    1806

Warnings
absolute symbol "length" being redefined                            Project_MSP430F6638    line 0    1366970122846    1800
absolute symbol "P4OUT_bit:origin" being redefined        Project_MSP430F6638    line 0    1366970122846    1801
absolute symbol "P8OUT_bit:origin" being redefined        Project_MSP430F6638    line 0    1366970122846    1802
absolute symbol "P9OUT_bit:origin" being redefined        Project_MSP430F6638    line 0    1366970122846    1803

Please could you tell me how I can solve this problem?

Thanks in advance,

Stratos


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>