|
Имею код:
/*****************************************************
This program was produced by the
CodeWizardAVR V1.24.6 Evaluation
Automatic Program Generator
© Copyright 1998-2005 Pavel Haiduc, HP InfoTech s.r.l.
http://www.hpinfotech.com
e-mail:office@hpinfotech.com
Project :
Version :
Date : 18.05.2005
Author : Freeware, for evaluation and non-commercial use only
Company :
Comments:
Chip type : ATmega128
Program type : Application
Clock frequency : 16,000000 MHz
Memory model : Small
External SRAM size : 0
Data Stack size : 1024
*****************************************************/
#include #define RXB8 1 #define FRAMING_ERROR (1< // Write a character to the USART1 Transmitter // Declare your global variables here void main(void) }; SIMULATION LOG Compiling source files... Simulating partition 1 [AC81A759]... Reading netlist... Real Time Simulation FAILED. ---------------------------------- Помогите. В чем проблема ?
E-mail:
info@telesys.ru
#define TXB8 0
#define UPE 2
#define OVR 3
#define FE 4
#define UDRE 5
#define RXC 7
#pragma used+
char getchar1(void)
{
char status,data;
while (1)
{
while (((status=UCSR1A) & RX_COMPLETE)==0);
data=UDR1;
if ((status & (FRAMING_ERROR | PARITY_ERROR | DATA_OVERRUN))==0)
return data;
};
}
#pragma used-
#pragma used+
void putchar1(char c)
{
while ((UCSR1A & DATA_REGISTER_EMPTY)==0);
UDR1=c;
}
#pragma used-
{
// Declare your local variables here
// USART1 initialization
// Communication Parameters: 8 Data, 1 Stop, No Parity
// USART1 Receiver: On
// USART1 Transmitter: On
// USART1 Mode: Asynchronous
// USART1 Baud rate: 38400
UCSR1A=0x00;
UCSR1B=0x18;
UCSR1C=0x06;
UBRR1H=0x00;
UBRR1L=0x19;
while (1)
{
// Place your code here
}
компилируется великолепно, но при попытке запуске в Протеусе выдает такую хрень:
==============
Design: C:\hobby\test128.DSN
Doc. no.:
Revision:
Author:
Created: 25/04/05
Modified: 17/05/05
Build completed OK.
Compiling netlist...
Linking netlist...
Partition analysis...
Animation started sucessfully...
PROSPICE Release 6.7 SP0 (C) Labcenter Electronics 1993-2005.
SPICE Kernel Version 3f5. (C) Berkeley University ERL.
Reading SPICE models...
Loading library 'ANALOGD.SML'
Loading library 'APEX.SML'
Loading library 'BURRBROWN.SML'
Loading library 'ELANTEC.SML'
Loading library 'FAIRCHLD.SML'
Loading library 'INTERSIL.SML'
Loading library 'LINTEC.SML'
Loading library 'NATOA.SML'
Loading library 'SUPERTEX.SML'
Loading library 'TECCOR.SML'
Loading library 'TEX101.SML'
Loading library 'TEX301.SML'
Loading library 'TEX3_1.SML'
Loading library 'TEX401.SML'
Loading library 'TEX5_1.SML'
Loading library 'VALVES.SML'
Loading library 'ZETEX.SML'
Building circuit...
Added GEARTH resistor for net #00008.
Added GEARTH resistor for net #00009.
Added GEARTH resistor for net #00010.
Instantiating SPICE models...
[U1] AVR model release 6.7 SP0.
[U1] Loaded 4096 bytes of persistent EEPROM data.
[U1] Loading HEX file 'sourceC\11.hex'.
[U1] Read total of 278 bytes from file 'sourceC\11.hex'.
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
LOOP LIMIT: TIME = 0.00128688. CALLBACK = 00000001, STATE =???
DSIM ERROR: DSIM: race condition detected at time 0.00128688.
[DSIM] RUN Error.
Ответы