LCD interfacing with s6e1a1 series Fm0+ device

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

hi to all,

   

i'm using 16*2 LCD .want to interface with s6e1a1 FM0+ series board .I know how to use gpio api but having problem in passing lcd command like 0x01,0x0f etc passing to gpio api. i'm not using lcd.c and lcd.h and examples are also not provide in PDL for my board .please provide solution to this problem . 

1 Solution

You need to write into the PDOR register, this register address is available in s6e1a1xc.h , you will see a macro #define FM0P_GPIO_PDOR3 .You can now write to this address in main/your application source. What you are referring to is bit/pin modification of P3_B .

View solution in original post

0 Likes
5 Replies
bharadhwajas_91
Employee
Employee
First like received First like given

Hi, 

   

In your code, you are writing to a single pin and not the port . You can write to the port data register (PDOR)or write to individual GPIO pins with their corresponding data.

0 Likes
Anonymous
Not applicable

hi,

   

I am using this API Gpio1pin_InitOut(GPIO1PIN_P3, Gpio1pin_InitVal( 0u ));

   

How to set a port so that i can send 8bit data to port 3 , and How to implement using Only PDOR register ? 

0 Likes
bharadhwajas_91
Employee
Employee
First like received First like given

Hi ,

   

The API you mentioned sets data to a particular pin and not port, there is no API to set data to a complete port ,You can either set each pins individually or write to PDOR register directly.

   

Please see PG No 625 and PG No 640 in the peripheral manual for PDORx information.

   

http://www.cypress.com/file/223051/download

   

In the PDL you can find the reference to the register in your \PDL\2.1.0\devices\fm0p\partno\common\partdevice.h

0 Likes
Anonymous
Not applicable

Hi,

   

Thanks for reply ,My Pdl path is C:\Users\Cypress\PDL\2.1.0\devices\fm0p\s6e1a1xc\common contain following files 

   

gpio_s6e1a1xc.h, mcu , s6e1a1xc , system_s6e1a1.h which file to modify . 

   

am i using right portion to modify?

   


#define GPIO1PIN_P3B_INITOUT(v)         do{ \
                                            bFM_GPIO_PDOR3_PB=(v).bInitVal; \
                                            bFM_GPIO_DDR3_PB=1u; \
                                            bFM_GPIO_PFR3_PB=0u; }while(0u)

   

tried to modify PDOR3 and sent data to v , but generated error?

0 Likes

You need to write into the PDOR register, this register address is available in s6e1a1xc.h , you will see a macro #define FM0P_GPIO_PDOR3 .You can now write to this address in main/your application source. What you are referring to is bit/pin modification of P3_B .

0 Likes