[an error occurred while processing this directive]
[an error occurred while processing this directive]
|
#include "BC.H"
void Setup(void)
{
PORTC = 0x00; // Prepare Port C as analog input
DDRC = 0x00; // with no pull-ups
PORTB = 0xFF; // Turn of Leds on Port B
DDRB = 0xFF; // Set PORTB as output
PORTD = 0xFF; // Turn on internal pull-ups for PORTD
ADCSR = 0x96; // Single A/D conversion, fCK/64
}
void main(void)
{
Setup();
for(;;)
{
CLRBIT(PORTB,(LED2));
SETBIT(PORTB,(LED2));
}
}
==================================================================
******************************************************************
==================================================================
А вот bc.h
==================================================================
******************************************************************
==================================================================
#include "io4433.h" // Function prototypes // Bit handling macros // PORT Connections #define LED0 0x01 //LED0 -> pin 0 on portB
E-mail:
info@telesys.ru
#include
//************************************************************************************
void Setup(void);
//************************************************************************************
#define SETBIT(x,y) (x |= (y)) // Set bit y in byte x
#define CLRBIT(x,y) (x &= (~(y)))// Clear bit y in byte x
#define CHKBIT(x,y) (x & (y)) // Check bit y in byte x
//************************************************************************************
#define LED1 0x04 //LED1 -> pin 2 on portB
#define LED2 0x08 //LED2 -> pin 3 on portB
#define LED3 0x10 //Led3 -> pin 4 on portB
Ответы