This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

can we use bdata,sbit in lpc2148??

I want to use the following code in lpc2148...but i am getting compile error..

bdata unsigned char bd1 ;
#define status=0;
sbit d0 = bd1^0;
sbit d1 = bd1^1;
sbit d2 = bd1^2;
sbit d3 = bd1^3;
sbit d4 = bd1^4;
sbit d5 = bd1^5;
sbit d6 = bd1^6;
sbit d7 = bd1^7;

After compiling i am getting,

error: #20: identifier "bd1" is undefined
error: #20: identifier "sbit" is undefined

I am using keil4..

Plz let me know how to write this code compatible with LPC2148.....

Parents
  • Basically, I would like you to answer me: did you read what I wrote?

    Have you found any part of the LPC2148 architecture that needs a bdata additional keyword?

    Have you found the "blinky" sample program or the user manual unable to explain how you read out GPIO pin state or sets pin state for the LPC2148?

    You want help. But what have _you_ done to try to figure out what the LPC2148 processor can do? Pasting code and getting a compilation error isn't exactly a big attempt from your side. If you want to program, then you must obviously also budget time for reading some documentation, and come back and ask questions when you are stuck, not able to understand something.

    You want to communicate using I2C - but without using any I2C hardware in the processor. Isn't that a quite big project for someone who don't manage to find the information how to set/get the pin state of a GPIO?

    What is your using for not using hardware I2C? That it forces you to learn how to use I2C with a LPC2148? Because the LPC2148 isn't pin compatible with a 8051 so you can't claim you already have existing hardware and just want to swap processor.

Reply
  • Basically, I would like you to answer me: did you read what I wrote?

    Have you found any part of the LPC2148 architecture that needs a bdata additional keyword?

    Have you found the "blinky" sample program or the user manual unable to explain how you read out GPIO pin state or sets pin state for the LPC2148?

    You want help. But what have _you_ done to try to figure out what the LPC2148 processor can do? Pasting code and getting a compilation error isn't exactly a big attempt from your side. If you want to program, then you must obviously also budget time for reading some documentation, and come back and ask questions when you are stuck, not able to understand something.

    You want to communicate using I2C - but without using any I2C hardware in the processor. Isn't that a quite big project for someone who don't manage to find the information how to set/get the pin state of a GPIO?

    What is your using for not using hardware I2C? That it forces you to learn how to use I2C with a LPC2148? Because the LPC2148 isn't pin compatible with a 8051 so you can't claim you already have existing hardware and just want to swap processor.

Children
No data