Search found 2 matches

by pavi017
Sun Nov 24, 2013 7:50 am
Forum: Code
Topic: MPL115A1 SPI Digital Barometer connected to ATMEGA16
Replies: 0
Views: 1852

MPL115A1 SPI Digital Barometer connected to ATMEGA16

#define Waitfor1(register, BIT) while(!(register & (1<<BIT))); #define Waitfor0(register, BIT) while((register & (1<<BIT))); void mastermode() { DDRB = DDRB | ob10110000; \\ this sets the sck mosi and ss as outputs DDRB = DDRB & ob10111111; \\ this sets miso as output SPCR |=(1<<MSTR); \\ set as ma...
by pavi017
Wed Nov 20, 2013 2:02 am
Forum: Code
Topic: Arduino code for the MPL115A1 Pressure Sensor (SPI)
Replies: 27
Views: 22339

Re: Arduino code for the MPL115A1 Pressure Sensor (SPI)

hey am not sure how it is different to write code from arduino to atmega16 but i am connecting this same sensor to an atmega16 and am not sure how to write the code for it to receive the temp and pressure values and display it through USART. #define Waitfor1(register, BIT) while(!(register & (1<<BIT...