| ??? 08/27/08 08:03 Read: times |
#157785 - Moved the variable Responding to: ???'s previous message |
Instructed Keil to load the "unsigned int i" in the idata area and now it behaves OK. I now can focus on other key areas in the code..
In the meanwhile is there any other simpler way to do the following ? :
union Addsplit {unsigned int FullAddress ;
unsigned char PartAddress[2];} Address;
unsigned char j,k;
Address.FullAdress = 0x1234;
j = Address.PartAddress[0];
k = Address.PartAddress[1];
...
...
Basically I have a sixteen bit address value and I need to send it through an SPI interface as two bytes followed by the 1 byte data to be written at that address. Thanks Raghu |
| Topic | Author | Date |
| Keil - Watch window | 01/01/70 00:00 | |
| use long data type | 01/01/70 00:00 | |
| Apparently, no | 01/01/70 00:00 | |
| Thanks. I use version 3.51 | 01/01/70 00:00 | |
| truncating the low byte...hmmm | 01/01/70 00:00 | |
| Moved the variable | 01/01/70 00:00 | |
| Alternative split | 01/01/70 00:00 | |
Yeah got it... | 01/01/70 00:00 |



