Thanks again Mike, in order for this
PB7 = PB7 | on;
to compile i had to change it to this
PB7 == PB7 | on;
It said Lvalue required
Thanks Andy
void loop()
{
PORTB |= _BV(PB7);
delay(500);
PORTB &=~ _BV(PB7);
delay(500);
}
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.
void cld_write_color(char hh,char ll)
{
PORTL |= _BV(PL0); // digitalWrite(LCD_RS, HIGH);
PORTL &=~ _BV(PL3);// digitalWrite(LCD_CS, LOW);
PORTC=hh;
PORTA=ll;
PORTL &=~ _BV(PL1);// digitalWrite(LCD_WR, LOW);
PORTL |= _BV(PL1); // digitalWrite(LCD_WR, HIGH);
PORTL |= _BV(PL3); // digitalWrite(LCD_CS, HIGH);
}
This is the Display im using
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=320606628830&ssPageName=STRK:MEWNX:IT#ht_500wt_716This is a link to the sellers youtube demo video
, my display was writing at the same speed, but using this direct port code it's updating superfast now