[an error occurred while processing this directive]
|
Код полностью такой
/*********************************************
This program was produced by the
CodeWizardAVR V1.23.8c Professional
Automatic Program Generator
© Copyright 1998-2003 HP InfoTech s.r.l.
http://www.hpinfotech.ro
e-mail:office@hpinfotech.ro
Project :
Version :
Date : 26.08.2006
Author : 1
Company :
Comments:
Chip type : AT90S2313
Clock frequency : 10,000000 MHz
Memory model : Tiny
External SRAM size : 0
Data Stack size : 32
*********************************************/
#include <90s2313.h> // Input/Output Ports initialization // Port D initialization // Timer/Counter 0 initialization // Timer/Counter 1 initialization // External Interrupt(s) initialization // Timer(s)/Counter(s) Interrupt(s) initialization // Analog Comparator initialization while (1) PORTB=k; };
#include
// Declare your global variables here
volatile unsigned char k=0;
void main(void)
{
// Declare your local variables here
// Port B initialization
// Func0=Out Func1=Out Func2=Out Func3=Out Func4=Out Func5=Out Func6=Out Func7=Out
// State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0 State7=0
PORTB=0x00;
DDRB=0xFF;
// Func0=Out Func1=Out Func2=Out Func3=Out Func4=Out Func5=Out Func6=Out
// State0=0 State1=0 State2=0 State3=0 State4=0 State5=0 State6=0
PORTD=0x00;
DDRD=0x7F;
// Clock source: System Clock
// Clock value: Timer 0 Stopped
TCCR0=0x00;
TCNT0=0x00;
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1 output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
OCR1H=0x00;
OCR1L=0x00;
// INT0: Off
// INT1: Off
GIMSK=0x00;
MCUCR=0x00;
TIMSK=0x00;
// Analog Comparator: Off
// Analog Comparator Input Capture by Timer/Counter 1: Off
// Analog Comparator Output: Off
ACSR=0x80;
{
// Place your code here
k++;
}
VNLAB пишет
[PC = $005C, Time = 0.28 ms, {I/O}]: Writting unknown data (X) to port
добавляю после "k++;" строку if (k==255){k=0;}; начинает работать... просто капец :(
Ответы
Перейти к списку ответов
|||
Конференция
|||
Архив
|||
Главная страница
|||
Содержание