This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Direct bit I/O

I have a bit-addressable var (ibase) that I am loading with a value and then rotating--placing the msb on an I/O pin (SData). The SData pin never changes--it stays high. What am I doing wrong? Thanks!

for(i=0;i<8;i++)
{ SClock = 0;
SData = ibase^7;
ibase = _irol_(ibase,1);
delay();
SClock = 1;
timer0_delay(5);
}

Parents
  • Actually, I like the maintainability of using C. It's much easier to revisit. Also, with more on-chip code space available these days, extra-tight code isn't as critical (unless there are time-critical requirements--then there's always the ability to add asm). I used the ternary definition as a springboard to find more information about those operators, and it has been very helpful.

Reply
  • Actually, I like the maintainability of using C. It's much easier to revisit. Also, with more on-chip code space available these days, extra-tight code isn't as critical (unless there are time-critical requirements--then there's always the ability to add asm). I used the ternary definition as a springboard to find more information about those operators, and it has been very helpful.

Children