[an error occurred while processing this directive] [an error occurred while processing this directive]
Вот текст. Помогите, бо сам сдурею.
(«Телесистемы»: Конференция «Микроконтроллеры и их применение»)
[an error occurred while processing this directive] [an error occurred while processing this directive]

Отправлено Владимир Вольфович 13 июня 2002 г. 23:28
В ответ на: давай текст смотреть отправлено Тумблер 13 июня 2002 г. 23:09

#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"
#include

// Function prototypes
//************************************************************************************
void Setup(void);

// Bit handling macros
//************************************************************************************
#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

// PORT Connections
//************************************************************************************

#define LED0 0x01 //LED0 -> pin 0 on portB
#define LED1 0x04 //LED1 -> pin 2 on portB
#define LED2 0x08 //LED2 -> pin 3 on portB
#define LED3 0x10 //Led3 -> pin 4 on portB

Составить ответ  |||  Конференция  |||  Архив

Ответы



Перейти к списку ответов  |||  Конференция  |||  Архив  |||  Главная страница  |||  Содержание  |||  Без кадра

E-mail: info@telesys.ru