I wanted to write a programs about traffic light,but the last line aiways say syntax error. Help >> about µVision is display:
IDE-Version: µVision V5.14.2 Copyright (C) 2015 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: 156 186 561 LIC=----
Tool Version Numbers: Toolchain: PK51 Prof. Develpers Kit Version: 9.54 Toolchain Path: C:\Users\PC39\Desktop\C51\BIN C Compiler: C51.exe V9.54 Assembler: A51.exe V8.02c Linker/Locator: BL51.exe V6.22 Librarian: LIB51.exe V4.30.1.0 Hex Converter: OH51.exe V2.7.0.0 CPU DLL: S8051.DLL V3.100.0.0 Dialog DLL: DP51.DLL V2.62.0.1
can you help me?
Do you think the specific error message and code might be more enlightening than the IDE version in this situation?
Use the PRE tags so it looks like you read the instructions.
I am sorry I do not understand what you mean. Will I post the error message to you?
The compiler says your code is broken, so you show me the version of the compiler/IDE, think about how that's going to help understand what is wrong with YOUR code.
If you want help with a compilation error message, then you would obviously have to supply the actual error message. And most likely you would also need to supply us with the relevant source code the error message is relating to since syntax errors relates to source code syntax - and we can't guess what your code looks like...
/*-------------------------------------------------- 系統é˜æŽ§è¨ˆæ™‚ä¸æ–·æœå‹™å¸¸å¼ --------------------------------------------------*/ #include <reg51.h> #include "system.h" #include "tick.h" #include "keypad.h"
#define TICK_INTERRUPT_PERIOD_CNT (((XTAL*TICK_INTERRUPT_PERIOD_MS)/1000)/12)
#define TICK_INTERRUPT_PERIOD_CNT (((XTAL*TICK_INTERRUPT_PERIOD_MS)/1000)/12) /********************************************************* MICRO_ADJUST = 計時器ä¸æ–·æ™‚間準確度微調,如ä¸æ–·èª¤å·®ï¼Œå–®ä½=指令時間,值減少則調慢(ä¸æ–·é€±æœŸæ™‚間調長)
*********************************************************/ #define MICRO_ADJUST 22 //é˜æŽ§è¨ˆæ™‚準確度微調 #define TICK_PERIOD ((65536-TICK_INTERRUPT_PERIOD_CNT)+MICRO_ADJUST) unsigned int SystemTick; //系統é˜æŽ§è¨ˆæ™‚值 unsigned int RetTick; //系統é˜æŽ§è¨ˆæ™‚回傳值
/*======================================================== 讀å–系統é˜æŽ§è¨ˆæ™‚值 ========================================================*/ unsigned int GetSystemTick(void) { #pragma asm /* 抓å–系統é˜æŽ§å€¼ */ MOV A,SystemTick+01H MOV RetTick+01H,A MOV A,SystemTick MOV RetTick,A /* 比較系統é˜æŽ§å€¼æœ‰ç„¡è®ŠåŒ– */ MOV A,SystemTick+01H CJNE A,RetTick+01H,DiffByInterrupt MOV A,SystemTick CJNE A,RetTick,DiffByInterrupt /* 系統é˜æŽ§å€¼æœ‰ç„¡è®ŠåŒ– */ JMP GtRet /* 系統é˜æŽ§å€¼æœ‰å› ä¸æ–·è€Œè®ŠåŒ–,é‡æ–°æŠ“å–系統é˜æŽ§å€¼ */ DiffByInterrupt MOV A,SystemTick+01H: MOV RetTick+01H,A MOV A,SystemTick MOV RetTick,A GtRet #pragma endasm: return(RetTick); /* 傳回系統é˜æŽ§å€¼ */ }
oh no I'm sorry i can post Chinese word in there. there are Chinese word in my Program.... How can i do....
well, how about posting the error message, not just "I get an error message"?
Post your code between PRE tags as described in the posting instructions, or post the code on PasteBin or something similar.