PDA

View Full Version : AN Question for "word" variable read The serial port



redfoen
- 14th December 2007, 05:52
ll friend;
AN Question for "word" variable read The serial port

'mcu=16f873a

program:
....
VCH1 VAR WORD
.....
OUTPUT PORTB.1 'SERIAL clock for {serget}
INPUT PORTB.2 'SERIAL DATA
.......
SERGET:
...
PORTB.1=1
PAUSEUS 2
VCH1.0=PORTB.2 'GET THE O BIT
PORTB.1=0
PAUSEUS 2
'-----
PORTB.1=1
PAUSEUS 2
VCH1.1=PORTB.2 'GET THE 1 BIT
PORTB.1=0
PAUSEUS 2
'------
PORTB.1=1
PAUSEUS 2
VCH1.2=PORTB.2 'GET THE 2 BIT
PORTB.1=0
PAUSEUS 2
'------
PORTB.1=1
PAUSEUS 2
VCH1.3=PORTB.2 'GET THE 3 BIT
PORTB.1=0
..........
..........
'------
PORTB.1=1
PAUSEUS 2
VCH1.15=PORTB.2 'GET THE 15 BIT
PORTB.1=0
......
RETURN
...........

QUESTION:
When "COMPILE" it, THE "MicroCode Studio" Prompt: "VCH1.0=PORTB.2 " ERROR;

Why?

Help Me please! thanks!
My english is so poor;

mister_e
- 14th December 2007, 17:39
mmm, with the snip above i don't have such error message. But sometimes the error message is not 100% spot on... Can you post your whole code?

Help Me please! thanks!
My english is so poor;
bah... don't worry about that, i've made over 4,000 post here... all in bad english... 'till now maybe 1-2 comments on that... don't worry, do your best, and we will try to help you as much as we can.