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

Forum Post: RE: Interfacing MSP430f5529 to SD card reader

$
0
0
The MSP has a couple of ports, each having eight bits in most cases, some have less if the device is small. So there could be... Port 1 BIT0 BIT1 BIT2 BIT3 BIT4 BIT5 BIT6 BIT7 Port 2 BIT0 BIT1 BIT2 BIT3 BIT4 BIT5 BIT6 BIT7 Each port has different registers like a DIR (direction), OUT (output), IN (input), SEL (select), ... For port 1 all these registers would be P1DIR, P1OUT, P1IN, P1SEL, ... For port 2 all these registers would be P2DIR, P2OUT, P2IN, P2SEL, ... The eight bits of each port can now be addressed individually - "BIT0" is a definition for 0x01, "BIT1" for 0x02, "BIT2" for 0x04, ... So if you want to set BIT2 of port 2 to output direction, you have to set P2DIR |= BIT2; or P2DIR |= 0x04;

Viewing all articles
Browse latest Browse all 63713

Trending Articles



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