Feb 22, 2006 #1 asic1984 Full Member level 5 Joined Nov 15, 2003 Messages 257 Helped 4 Reputation 8 Reaction score 1 Trophy points 1,298 Activity points 2,340 code warrior ddra hi i tried this code in the codewarrier but when simulating it didnot make what it should do the program simply just make porta output high Code: #define _REG_BASE 0 #define _P(off) *(unsigned char volatile *)(_REG_BASE + off) #define PORTA _P(0x00) #define DDRA _P(0x02) void main(void) { /* include your code here */ DDRA=0xff; PORTA=0xff; } put in simulation no values are sent to porta or even ddra thanks for help
code warrior ddra hi i tried this code in the codewarrier but when simulating it didnot make what it should do the program simply just make porta output high Code: #define _REG_BASE 0 #define _P(off) *(unsigned char volatile *)(_REG_BASE + off) #define PORTA _P(0x00) #define DDRA _P(0x02) void main(void) { /* include your code here */ DDRA=0xff; PORTA=0xff; } put in simulation no values are sent to porta or even ddra thanks for help
May 2, 2006 #2 A abdalla Member level 4 Joined Mar 22, 2006 Messages 79 Helped 2 Reputation 4 Reaction score 1 Trophy points 1,288 Activity points 1,802 ddra codewarrior u can try this #define _REG_BASE 0 #define PORTA 0x00 #define DDRA 0x02 void main(void) { /* include your code here */ DDRA=0xff; PORTA=0xff; } secondly HOW did u know that it didn`t work? I see that the simplest way to see the output to see the address 0x00 in the memory windows
ddra codewarrior u can try this #define _REG_BASE 0 #define PORTA 0x00 #define DDRA 0x02 void main(void) { /* include your code here */ DDRA=0xff; PORTA=0xff; } secondly HOW did u know that it didn`t work? I see that the simplest way to see the output to see the address 0x00 in the memory windows