Not applicable
May 05, 2016
12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 05, 2016
12:08 PM
I hooked up a 16x2 lcd to the XMC 1100 Boot kit...but i can't get it to display anything.This is how i hooked it up:
RW to P0.7
RS to P1.0
E to P1.1
D0 to P0.9
D1 to P0.8
D2 to P0.12
D3 to P0.3
D4 to P0.2
D5 to P0.1
D6 to P0.0
D7 to P1.4
This is my code:
I don't know how good the code is because i'm a first-year student and this is the first time i program a microcontroller. In the SysThick_Handler i first sent an instruction to activate the display and cursor and then i set the RS on 1 and then sent the data to display the "P" character. At least that's what i think i did..i saw this on some tutorials..but i on others microcontrollers...and they actually wrote something like this:
So can you tell me where i did wrong..or if it's possible to connect a lcd display to the XMC 1100 boot kit?
RW to P0.7
RS to P1.0
E to P1.1
D0 to P0.9
D1 to P0.8
D2 to P0.12
D3 to P0.3
D4 to P0.2
D5 to P0.1
D6 to P0.0
D7 to P1.4
This is my code:
#include
#include "XMC1100.h"
#include "GPIO.h"
#define TICKS_PER_SECOND 10UL
int main(void)
{
P1_1_set_mode(OUTPUT_PP_GP);
P1_1_set();
P1_4_set_mode(OUTPUT_PP_GP);
P1_4_set();
P0_7_set_mode(OUTPUT_PP_GP);
P1_0_set_mode(OUTPUT_PP_GP);
P0_9_set_mode(OUTPUT_PP_GP);
P0_8_set_mode(OUTPUT_PP_GP);
P0_12_set_mode(OUTPUT_PP_GP);
P0_3_set_mode(OUTPUT_PP_GP);
P0_2_set_mode(OUTPUT_PP_GP);
P0_1_set_mode(OUTPUT_PP_GP);
P0_0_set_mode(OUTPUT_PP_GP);
P0_7_set();
P1_0_set();
P0_9_set();
P0_8_set();
P0_12_set();
P0_3_set();
P0_2_set();
P0_1_set();
P0_0_set();
SysTick_Config(SystemCoreClock / TICKS_PER_SECOND);
while(1);
}
void SysTick_Handler(void)
{
static uint32_t ticks = 0;
ticks++;
if(ticks==10)
{
P0_0_set();
P0_1_set();
P0_2_set();
P0_3_reset();
P0_12_reset();
P0_8_reset();
P0_9_reset();
P1_0_set();
P0_7_set();
P1_1_reset();
P1_1_set();
}
if(ticks==20)
{
P0_0_reset();
P0_1_set();
P0_2_reset();
P0_3_set();
P0_12_set();
P0_8_set();
P0_9_set();
P1_0_set();
P0_7_set();
P1_1_reset();
P1_1_set();
}
}
I don't know how good the code is because i'm a first-year student and this is the first time i program a microcontroller. In the SysThick_Handler i first sent an instruction to activate the display and cursor and then i set the RS on 1 and then sent the data to display the "P" character. At least that's what i think i did..i saw this on some tutorials..but i on others microcontrollers...and they actually wrote something like this:
#define D0 P0_9
int main()
{
D0=1;//that's how they set the pin to 1...i did this thing with reset..but i don't think it's the same thing...
}
So can you tell me where i did wrong..or if it's possible to connect a lcd display to the XMC 1100 boot kit?
2 Replies
Not applicable
May 06, 2016
08:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May 06, 2016
08:14 AM
Can someone please help me?
Dec 08, 2016
02:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dec 08, 2016
02:48 AM
hi ifrimrares,
please risk a look at this thread:
https://www.infineonforums.com/threads/1895-Is-there-an-APP-for-16x2-LCD-Display
br
please risk a look at this thread:
https://www.infineonforums.com/threads/1895-Is-there-an-APP-for-16x2-LCD-Display
br