Pin 48? I assume you're using the Arduino Mega then. Since the microcontroller differs on some of these boards, it'd be best if you posted the link to the datasheet for the microcontroller on your board.
Yes i am using a Mega, my question isn't controller specific though, im using portL for lcd control i know how to send a value to the port, i would like to know how to BSF and BCF specific bits on the port instead of using digitalwrite.
BTW it's an atmega 1280
what is a suprise is that if i change the PB7's to PB5's for Duemilanove and select Duemilanove from tools menu this code will not compile, I got PB7 from pins_arduino.c in the cores folder
One of the pitfalls of the C/C++ programming language is that it will let you have an expression that does nothing. Your statements don't change the port. Here's one way to do it:
Bingo. this flashes Pin 13 Led, this is not the purpose of the code though, i have a 320x240 rgb lcd and using digitalWrite is painfully slow for the purpose of setting control bits and clocking 10x slower http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1279055639/7
Thanks for your help guys
**** Update ****
Thanks again PPL, the display is updating superfast now.
The line:PB7 == PB7 | on;does not change any bits. The "==" operator is used to compare two values. The '=' operator is used to change a variable.
The reason why the version with the '=' got a compile error is that PB7 is a constant. I gave the example without checking to see if PB7 was the appropriate term. As someone else pointed out, it is not.
It's been a while since i've done any logical operations, the last thing i did was a 8ch logic analiser in borland visual c, im suprised to see how some opperation differ between versons of c/c++.
I know this code can go faster by using inline ASM but for the moment im just glad it's working