I'm working on MODBUS protocol, where I have to write to pin using address given by master. Is it possible to write to a peripheral using peripheral address?
IDE: MCUXpresso
Controller : LPC1517
Brief:
I would like to write to GPIO PIN PIO1_0, whose byte address is 0x1c000020. So, in order to make the pin high, should I write to address 0x1c000020? I tried using the following code:
uint8_t volatile *gpio = (uint8_t *)0x1c000020;*gpio = 0x1;
Is it possible to do so?a
Hello ATHMESH NANDAKUMAR ,
Yes, you can.
Do you have any problem when you using it ?
Have a great day,
TIC
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
No I used a different method