Quantcast
Channel: MSP low-power microcontrollers
Viewing all articles
Browse latest Browse all 62309

Forum Post: RE: How to correctly define a name to a output port bit.

$
0
0
Please Help- This is getting frustrating!! I put the following test code sequence in CCS C; P8SEL = 0x00; // all pins of PORT8 are DIOs P8DIR = 0xFF; // // i/o all out P8OUT = 0xFF; P9SEL = 0x00; // all pins of PORT9 are DIOs P9DIR = 0xFF; // // i/o all out P9OUT = 0xFF; Line Code 95 B8_1(&P8OUT)=0; 96 B8_1(&P8OUT)=1; 97 B8_1(&P8OUT)=0; 98 B8_1(&P9OUT)=0; 99 B8_1(&P9OUT)=1; 100 B8_1(&P9OUT)=0; When i compile and run to line 95 then single step, it seems to execute line 95, then jumps to line 98, then jumps over to line 101. The disassembly is below. When I look at the registers P8OUT and P9OUT neither changes from FF. Possibly the Bit.def.h shown in the beginning of this post is incorrect?? Please Help. Thanks 0114b2: C3A2 003B BIC.W #2,&Port_7_8_P8OUT 98 B8_1(&P9OUT)=0; 0114b6: D3A2 000A BIS.W #2,&Port_9_10_P9OUT

Viewing all articles
Browse latest Browse all 62309

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>