Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void slowSPIwrite(uint8_t d) {
- for (int8_t i=7; i>=0; i--) {
- P3OUT &= ~BIT3; //set clk low
- if (d & (1<<i) ) {
- P3OUT |= BIT1; // if 1 set
- } else {
- P3OUT &= ~BIT1; // if 0 res
- }
- P3OUT |= BIT3; // set clock hi then reset
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment