in ARM , how can i change the values at the output pins? i.e.,in my program, i cant use the IOSET and IOCLR commands to change the values at the output pins bcoz the output in my program should change depending on the runtime variables(about which i cant have a prior knowledge)
ex.: in AVR compilers, i can use......
PORTA.0=X (where X is a run time variable) {for manipulating the 0th pin of portA)
how can i do similarly in ARM conrrollers?? can i use PORT1.0=X
is there any such possibility??
Standard bit manipulation.
Depending on ARM chip, you may be able to directly write 8-, 16- or 32-bit values to a port. If you want to change individual values, you will have to do bit operations, or possibly for some ARM models mask the bits to access.
In your case, you can write:
IOSET = (1<<0);
to set bit 0.
IOSET = (1<<0) | (1<<7) | (1<<12);
will set bit 0, 7 and 12.
But haven't you looked at the example programs available with the Keil compiler and available from the chip manufacturer? Always spend time going through all the example programs before you start writing own programs.