Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

C programming Q

2005-02-10 by Javier Fiasche

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)
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
Visita www.tutopia.com y comienza a navegar más rápido en Internet. Tutopia es Internet para todos.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.