[bascom] GetRC command not working!
hi,
This is driving me INSANE! Whenever I try to compile any program with
the Getrc command, i get an error. I have BASCOM-AVR version 1.0.0.9c
(on compiler and the other thingy), and it is set to AT90S8515 chip,
but problem happens on any. I get these error messages when trying to
compile the EXAMPLE as well (below)! The error messages are:
Error: 211 Line:26 External routine not found [_GETRC]
Error: 61 Line:26 Label not found [_GETRC ]
Line 26 is the Loop command! If I comment out the line like so,
'W = Getrc(pind , 4)
The errors go away! This doesn't make any sense at all ? It
references the last line of code, EVERY TIME, even if there IS
NOTHING THERE! I just hit enter so there is a blank line, and it
tells me the error message.
Thank you for stoping me from going insane :)
Colin
'--------------------------------------------------------------------------
' GETRC.BAS
' demonstrates how to get the value of a resistor
' The library also shows how to pass a variable for use with
individual port
' pins. This is only possible in the AVR architecture and not in the
8051
'--------------------------------------------------------------------------
'The function works by charging a capacitor and uncharge it little by
little
'A word counter counts until the capacitor is uncharged.
'So the result is an indication of the position of a pot meter not
the actual
'resistor value
'This example used the 8535 and a 10K ohm variable resistor connected
to PIND.4
'The other side of the resistor is connected to a capacitor of 100nF.
'The other side of the capacitor is connected to ground.
'This is different than BASCOM-8051 GETRC! This because the
architecture is different.
'The result of getrc() is a word so DIM one
Dim W As Word
Do
'the first parameter is the PIN register.
'the second parameter is the pin number the resistor/capacitor is
connected to
'it could also be a variable!
W = Getrc(pind , 4)
Print W
Wait 1
Loop
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/