This is my first post in the forums and whilst being a C# dev for nearly 8 years, I've not done much with C or C++. I have recently purchased the DFRobots LCD 48x84 shield (http://goo.gl/BFlhd) and was trying to work out where to start converting the C to C#? I got a bit stumped with things like:
TCCR2A &= ~((1<<WGM21) | (1<<WGM20)); TCCR2B &= ~(1<<WGM22); TCCR2B = (1<<CS22)|(1<<CS21); ASSR |=(0<<AS2); // Use normal mode TCCR2A =0; //Timer2 Overflow Interrupt Enable TIMSK2 |= (0<<OCIE2A); TCNT2=0x6; // counting starts from 6; TIMSK2 = (1<<TOIE2); SREG|=1<<SREG_I;And even more like that...
// LCD_RST = 0; DDRD |= (1<<SPI_CS)|(1<<LCD_DC)|(1<<LCD_RST)|(1<<SPI_MOSI)|(1<<SPI_SCK)|(1<<LCD_BL); PORTD &= ~(1<<LCD_RST); delayMicroseconds(1); PORTD |= (1<<LCD_RST); PORTD &= ~(1<<SPI_CS); delayMicroseconds(1); PORTD |= (1<<SPI_CS); delayMicroseconds(1);
I searched to see if someone has already converted this (no sense reinventing the wheel) but couldn't find anything.
Does anyone have any pointers?
Thanks