Hey all, i have a little C
programming question....
I am using a Atmel Dataflash Library which contais the
next sentence
DF_DD|=(1<
i am
defining:
#define
DF_DD
DDRB // SPI Port Data Direction
Register
#define DF_PORT PORTB // SPI Port Register
#define DF_SS PORTB.4 // Chip Select bit
#define DF_SCK PORTB.7 // SPI Clock bit
#define DF_MOSI PORTB.5 // SPI Master Out bit
#define DF_MISO PINB.6 // SPI Master In bit
#define DF_RDY PINC.5 // RDY/BSY Flag (Hardware)
#define DF_PORT PORTB // SPI Port Register
#define DF_SS PORTB.4 // Chip Select bit
#define DF_SCK PORTB.7 // SPI Clock bit
#define DF_MOSI PORTB.5 // SPI Master Out bit
#define DF_MISO PINB.6 // SPI Master In bit
#define DF_RDY PINC.5 // RDY/BSY Flag (Hardware)
but the sentences seem to hace no effect when debugging
it with Avr Studio, i am using Codevision C
compiler
Here goes the question: How should be defined DF_MOSI,
etc., so the code has effect???? i do not much understand this kind of
senteces (rather use PORTC.1=1) but as they appear in lots of libraries and
sample code i am trying to get used to
them.
In the mega32.h portb, etc , are define as: ; sfrb
PORTB=0x18;
Any
suggestions??
Thanksd a
lot,
Javier