Sign in

username:

password:



Not a member?

Search basicx



Search tips

Subscribe to basicx



basicx by Keywords

Accelerometer | ADC | ADXL | Adxl20 | AVR | BasicStamp | BX-35 | BX28 | BX35 | COM3 | Compiler | Downloader | EEPROM | Electromagnet | GetADC | GP2D1 | GPS | I2C | IDE | Keypad | LCD | LCD+ | MIDI | Motors | Multitasking | Netmedia | Networking | PCB | PID | PlaySound | PWM | Relays | RTC | Servo | ShiftOut | SitePlayer | SPI | Stack | Timer | USB

Ads

Discussion Groups

Discussion Groups | BasicX | reading a thermister

Discussion forum for the BasicX family of microcontroller chips.

reading a thermister - jmayn2002 - Dec 17 19:49:00 2001

hi i was doing the example for get adc to read a thermister. my
question is how do i see the value for the voltage or resistance on
the screen.below is the code i compiled and ran. thank you jpm.
Option Explicit
dim voltage as integer
const pinnumber as byte = 13
dim v as single
Public Sub Main()
voltage = getadc(13)
call getadc(13, v)
End Sub





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )


Re: reading a thermister - Tony Brenke - Dec 17 19:57:00 2001

use the serialport.bas that is in the example section.
define com1
then

> Option Explicit
> dim voltage as integer
> const pinnumber as byte = 13
> dim v as single
> Public Sub Main()
> voltage = getadc(13)
> call getadc(13, v)
call putbyte(v)
> End Sub --- jmayn2002 <> wrote:
> hi i was doing the example for get adc to read a thermister. my
> question is how do i see the value for the voltage or resistance on
> the screen.below is the code i compiled and ran. thank you jpm. >
> Option Explicit
> dim voltage as integer
> const pinnumber as byte = 13
> dim v as single
> Public Sub Main()
> voltage = getadc(13)
> call getadc(13, v)
> End Sub >

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: reading a thermister - jmayn2002 - Dec 18 5:04:00 2001

tony thanks for the help, it took me a while to get the serialport.bas
set up right. i am new to programing. i am still having trouble with
the call putbyte(v). when i compile i get an error message that says
type of actual parameter does not match that of formal parameter.
thank you for the help. jpm.
--- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> use the serialport.bas that is in the example section.
> define com1
> then
>
> > Option Explicit
> > dim voltage as integer
> > const pinnumber as byte = 13
> > dim v as single
> > Public Sub Main()
> > voltage = getadc(13)
> > call getadc(13, v)
> call putbyte(v)
> > End Sub > --- jmayn2002 <jmayn2002@y...> wrote:
> > hi i was doing the example for get adc to read a thermister. my
> > question is how do i see the value for the voltage or resistance
on
> > the screen.below is the code i compiled and ran. thank you jpm.
> >
> >
> >
> > Option Explicit
> > dim voltage as integer
> > const pinnumber as byte = 13
> > dim v as single
> > Public Sub Main()
> > voltage = getadc(13)
> > call getadc(13, v)
> > End Sub
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > __________________________________________________




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Re: reading a thermister - Stewart McCallum - Dec 18 5:21:00 2001

I don't believe you can use the " PutByte" command while trying to output a
Integer or Single. You'll have to either convert the V to a byte( depending
your resolution) or use the "PutI" instead of PutByte...

Hope it helps

Stewart McCallum
Sydney,Au

----- Original Message -----
From: jmayn2002 <>
To: <>
Sent: Tuesday, December 18, 2001 9:04 PM
Subject: [BasicX] Re: reading a thermister > tony thanks for the help, it took me a while to get the serialport.bas
> set up right. i am new to programing. i am still having trouble with
> the call putbyte(v). when i compile i get an error message that says
> type of actual parameter does not match that of formal parameter.
> thank you for the help. jpm.
> --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> > use the serialport.bas that is in the example section.
> > define com1
> > then
> >
> > > Option Explicit
> > > dim voltage as integer
> > > const pinnumber as byte = 13
> > > dim v as single
> > > Public Sub Main()
> > > voltage = getadc(13)
> > > call getadc(13, v)
> > call putbyte(v)
> > > End Sub
> >
> >
> > --- jmayn2002 <jmayn2002@y...> wrote:
> > > hi i was doing the example for get adc to read a thermister. my
> > > question is how do i see the value for the voltage or resistance
> on
> > > the screen.below is the code i compiled and ran. thank you jpm.
> > >
> > >
> > >
> > > Option Explicit
> > > dim voltage as integer
> > > const pinnumber as byte = 13
> > > dim v as single
> > > Public Sub Main()
> > > voltage = getadc(13)
> > > call getadc(13, v)
> > > End Sub
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> > __________________________________________________
>





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: reading a thermister - Stewart McCallum - Dec 18 5:24:00 2001

I don't believe you can use the " PutByte" command while trying to output a
Integer or Single. You'll have to either convert the V to a byte( depending
your resolution) or use the "PutI" instead of PutByte...

Hope it helps

Stewart McCallum
Sydney,Au

----- Original Message -----
From: jmayn2002 <>
To: <>
Sent: Tuesday, December 18, 2001 9:04 PM
Subject: [BasicX] Re: reading a thermister > tony thanks for the help, it took me a while to get the serialport.bas
> set up right. i am new to programing. i am still having trouble with
> the call putbyte(v). when i compile i get an error message that says
> type of actual parameter does not match that of formal parameter.
> thank you for the help. jpm.
> --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> > use the serialport.bas that is in the example section.
> > define com1
> > then
> >
> > > Option Explicit
> > > dim voltage as integer
> > > const pinnumber as byte = 13
> > > dim v as single
> > > Public Sub Main()
> > > voltage = getadc(13)
> > > call getadc(13, v)
> > call putbyte(v)
> > > End Sub
>
[Non-text portions of this message have been removed]





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: Re: reading a thermister - Tony Brenke - Dec 18 12:08:00 2001

use call puts(v)
that will display a single.

use call puti(v)
that will display an integer.

--- Stewart McCallum <> wrote:
> I don't believe you can use the " PutByte" command while trying to output a
> Integer or Single. You'll have to either convert the V to a byte( depending
> your resolution) or use the "PutI" instead of PutByte...
>
> Hope it helps
>
> Stewart McCallum
> Sydney,Au
>
> ----- Original Message -----
> From: jmayn2002 <>
> To: <>
> Sent: Tuesday, December 18, 2001 9:04 PM
> Subject: [BasicX] Re: reading a thermister > > tony thanks for the help, it took me a while to get the serialport.bas
> > set up right. i am new to programing. i am still having trouble with
> > the call putbyte(v). when i compile i get an error message that says
> > type of actual parameter does not match that of formal parameter.
> > thank you for the help. jpm.
> > --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> > > use the serialport.bas that is in the example section.
> > > define com1
> > > then
> > >
> > > > Option Explicit
> > > > dim voltage as integer
> > > > const pinnumber as byte = 13
> > > > dim v as single
> > > > Public Sub Main()
> > > > voltage = getadc(13)
> > > > call getadc(13, v)
> > > call putbyte(v)
> > > > End Sub
> > >
> [Non-text portions of this message have been removed] >

__________________________________________________





(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )

Re: reading a thermister - jmayn2002 - Dec 18 16:31:00 2001

tony and stewart thank you for youre help. i used the puts(v)
it worked great. thanks. jpm.
--- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> use call puts(v)
> that will display a single.
>
> use call puti(v)
> that will display an integer. >
>
> --- Stewart McCallum <smccallum01@d...> wrote:
> > I don't believe you can use the " PutByte" command while trying
to output a
> > Integer or Single. You'll have to either convert the V to a byte(
depending
> > your resolution) or use the "PutI" instead of PutByte...
> >
> > Hope it helps
> >
> > Stewart McCallum
> > Sydney,Au
> >
> > ----- Original Message -----
> > From: jmayn2002 <jmayn2002@y...>
> > To: <basicx@y...>
> > Sent: Tuesday, December 18, 2001 9:04 PM
> > Subject: [BasicX] Re: reading a thermister
> >
> >
> > > tony thanks for the help, it took me a while to get the
serialport.bas
> > > set up right. i am new to programing. i am still having trouble
with
> > > the call putbyte(v). when i compile i get an error message that
says
> > > type of actual parameter does not match that of formal
parameter.
> > > thank you for the help. jpm.
> > > --- In basicx@y..., Tony Brenke <trbrenke@y...> wrote:
> > > > use the serialport.bas that is in the example section.
> > > > define com1
> > > > then
> > > >
> > > > > Option Explicit
> > > > > dim voltage as integer
> > > > > const pinnumber as byte = 13
> > > > > dim v as single
> > > > > Public Sub Main()
> > > > > voltage = getadc(13)
> > > > > call getadc(13, v)
> > > > call putbyte(v)
> > > > > End Sub
> > > >
> >
> >
> >
> > [Non-text portions of this message have been removed]
> >
> >
> >
> >
> >
> >
> >
> > __________________________________________________




(You need to be a member of basicx -- send a blank email to basicx-subscribe@yahoogroups.com )