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 | DAC code needed

Discussion forum for the BasicX family of microcontroller chips.

DAC code needed - "James R. Parish" - Dec 21 7:31:52 2007

I have been away from my beloved BX-24 chores (other than buying a
Kubota BX-24J) and now find I have a project that needs a BX-24. I need
to get a DAC going with 0-5V from 00000000b-11111111b. I assume we can
use PWM out of the BX-24 with a filter on the pin correct? Anyone have
a sniplet of code ready to do this?

Thanks, Jim

[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: DAC code needed - "James R. Parish" - Dec 22 13:44:52 2007

I found the DACPIN and I'm going to try that in a bit but in the mean
time I'm trying to interface a 4x20 LCD in 4-bit mode without any luck.
Does anyone have any code that is known to work? I found some but it
was for the BX35 and I'm not sure if my converting to BX24 is right.

From: b...@yahoogroups.com [mailto:b...@yahoogroups.com] On Behalf
Of James R. Parish
Sent: Friday, December 21, 2007 7:23 AM
To: b...@yahoogroups.com
Subject: [BasicX] DAC code needed

I have been away from my beloved BX-24 chores (other than buying a
Kubota BX-24J) and now find I have a project that needs a BX-24. I need
to get a DAC going with 0-5V from 00000000b-11111111b. I assume we can
use PWM out of the BX-24 with a filter on the pin correct? Anyone have
a sniplet of code ready to do this?

Thanks, Jim

[Non-text portions of this message have been removed]

[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: DAC code needed - Tom Becker - Dec 22 17:57:22 2007

> ... I'm trying to interface a 4x20 LCD in 4-bit mode...

I see at least three 4-bit LCD examples in Files, Jim:
http://tech.groups.yahoo.com/group/basicx/files/Datasheets-Appnotes-Examples-Drawings/LCD/

DACPin puts a PWM burst on a pin that, once low-pass filtered and
buffered, approximates a voltage. It must be refreshed repeatedly,
usually easily with its own task. Because of the necessary filtering
it is not particularly fast nor suitable for quickly-changing values -
but does fine to set a slowly-changing or fixed 8-bit value, perhaps
like an opamp DC offset bias. Searching the message archive will
yield many hits but few real implementations. Since it usually
requires additional hardware anyway, some who have used it lean toward
an external SPI DAC instead and enjoy more resolution, too.

What is a Kubota BX-24J?
Tom



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

RE: Re: DAC code needed - "James R. Parish" - Dec 27 0:01:16 2007

I got the DACPIN working great! I used a 1K resistor and .1uf cap into
a LM741 opamp running in a task. After goggle-converting the LCD six
pin code from Spanish it also works great.

Thanks Tom.

From: b...@yahoogroups.com [mailto:b...@yahoogroups.com] On Behalf
Of Tom Becker
Sent: Saturday, December 22, 2007 5:39 PM
To: b...@yahoogroups.com
Subject: [BasicX] Re: DAC code needed

> ... I'm trying to interface a 4x20 LCD in 4-bit mode...

I see at least three 4-bit LCD examples in Files, Jim:
http://tech.groups.yahoo.com/group/basicx/files/Datasheets-Appnotes-Exam
ples-Drawings/LCD/

DACPin puts a PWM burst on a pin that, once low-pass filtered and
buffered, approximates a voltage. It must be refreshed repeatedly,
usually easily with its own task. Because of the necessary filtering
it is not particularly fast nor suitable for quickly-changing values -
but does fine to set a slowly-changing or fixed 8-bit value, perhaps
like an opamp DC offset bias. Searching the message archive will
yield many hits but few real implementations. Since it usually
requires additional hardware anyway, some who have used it lean toward
an external SPI DAC instead and enjoy more resolution, too.

What is a Kubota BX-24J?

[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 )