Re: gEDA-user: furnace controller I/O port again
> You still need to interrupt a processor (with all the cache > contention implications) at least 100 times (and probably 300 > real-time-response required interrupts, if there is no hardware help > at all) to read out a temperature. The second of my implementations > cuts that to only one. Same reasoning I'm using r8c's to run the 1wire protocol on my next furnace board. Bit-banging it at the moment uses up half of a 400MHz PC's available CPU time, and that's just enough to poll each zone once every 15 seconds (temp + humidity, plus checking for button presses). ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
Greg - On Wed, Nov 08, 2006 at 12:42:06PM +1100, Greg Cunningham wrote: > What about shifting the bit-banging into a IRQ/timer-driven kernel > module that sends smoke signals (not literally...) to user-land when the > tx/rx sequence is complete? a bit like a software UART emulation... You still need to interrupt a processor (with all the cache contention implications) at least 100 times (and probably 300 real-time-response required interrupts, if there is no hardware help at all) to read out a temperature. The second of my implementations cuts that to only one. > maybe someone has already written 1-wire kernel code. Kernel, user-space, doesn't matter to the above observation. Do you want your processor to get some real work done, or take coffee-breaks every 60 microseconds? I put this code into service on a heavily loaded 300 MHz PowerPC, that had _other_ real-time demands on it. Just reading out temperatures shouldn't be a stressful operation. The one-bit-at-a-time minimal implementation was used when I had effectively zero free gates on the FPGA, and it was only used to read out a serial number at boot time, so CPU loading was irrelevant. - Larry ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
Thanks Larry. Haven't plucked up the courage to touch a FPGA yet maybe soon. ...thought #1 (possibly a bad one)... What about shifting the bit-banging into a IRQ/timer-driven kernel module that sends smoke signals (not literally...) to user-land when the tx/rx sequence is complete? a bit like a software UART emulation... ...thought #2... maybe someone has already written 1-wire kernel code. -- Greg On Tue, 2006-11-07 at 14:33, [EMAIL PROTECTED] wrote: > Friends - > > On Mon, Nov 06, 2006 at 07:08:48PM -0500, DJ Delorie wrote: > > > DJ, Are you writing code for the Dallas 1-wire protocol? Neat. > > Lots of bit banging. > > If anyone wants FPGA code for 1-Wire, I have some. You can > either click through the stupid (but innocuous) licence > agreement at http://recycle.lbl.gov/llc-suite/, or e-mail me. > ... ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
Friends - On Mon, Nov 06, 2006 at 07:08:48PM -0500, DJ Delorie wrote: > > DJ, Are you writing code for the Dallas 1-wire protocol? Neat. > Lots of bit banging. If anyone wants FPGA code for 1-Wire, I have some. You can either click through the stupid (but innocuous) licence agreement at http://recycle.lbl.gov/llc-suite/, or e-mail me. I have two versions: one is a very simple one-bit transfer, minimal gates, but takes the real-time burden off the host computer. The other does enough sequencing to read a temperature from a DS1822; all the computer has to do is write the "stimulus" message to the FPGA at the beginning, wait 750 ms, and read the "response" message at the end. With C code, tested in hardware, and including a simulation test bench set up to do regression testing. - Larry ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
> DJ, Are you writing code for the Dallas 1-wire protocol? Neat. Yes. The current board is bit-banged from a beige PC sitting on the floor next to the furnace. One PC parallel port talking to up to 16 1wire devices (depending on how many switches you're pressing ;) on four busses. Also bit banging all the serial lines for the LCDs and the GPIOs for the furnace itself. Lots of bit banging. The new one will be bit-banged from a set of R8C microcontrollers. One gumstix (xscale) has the "smarts", it's I2C line talks to five R8C's. Four are zone controllers; each manages the 1wire and serial lines for that zone. The fifth manages the 24VAC drivers for the furnace. Yes, I'll have a six-processor linux furnace. Maybe three more in the future if I upgrade the thermostats with MCUs also. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
On Fri, 2006-11-03 at 15:36, DJ Delorie wrote: > > Which frequently gets people into trouble when they try to use > > Op-Amps as Comparators: ... > The lines will (initially, at least) carry 1wire (1-15 uS pulses) and > RS-232 (9600 baud). ... DJ, Are you writing code for the Dallas 1-wire protocol? Neat. I cheated. I used a PICAXE for my heat pump (Oz-talk for HVACs?) until I get to develop PIC-level code. I want to talk to 3x Dallas Temp sensors & soft start my duct fan (phase controlled start of a MOC30xx-coupled triac). Sigh, as usual, THe S/S+N ratio in my life is too high, & I will live with the PICAXE for another year or so. -- Greg ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
On 11/2/06, Dave McGuire <[EMAIL PROTECTED]> wrote: On Nov 2, 2006, at 8:15 PM, Bob Paddock wrote: >> I'll look into it. The thing about op amps is that they're cheap and >> tiny. > > Which frequently gets people into trouble when they try to use > Op-Amps as Comparators: ... > TI: > Op Amps and Comparators - Don't Confuse Them > > Operational amplifiers (op amps) and comparators look similar; they > even have very similar schematic symbols. > This leads a lot of designers to think they are interchangeable. > There is a strong temptation to use a spare section > of a multiple op amp package as a comparator to save money. This > application note will explain why designers should not do this. > > http://encon.fke.utm.my/nikd/latest/sloa067.pdf > Download .pdf (sloa067.pdf, 150 Kbytes)" Not to butt in, but...wow, that is a VERY informative article...Thanks for sending that URL! -Dave I think the article is overstating things a little bit. Sure, op-amps make lousy, slow comparators. But commercially successful op-amps aren't going to burn up if you let the output go to a rail! Some high-spec opamps may have limitations, such as high current in the input stage if you exceed a certain differential voltage, but these limitations should be called out in the datasheet. And expensive, exotic amps aren't the ones being pressed into comparator duty. Regards, Mark [EMAIL PROTECTED] -- You think that it is a secret, but it never has been one. - fortune cookie ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
On Nov 2, 2006, at 8:15 PM, Bob Paddock wrote: I'll look into it. The thing about op amps is that they're cheap and tiny. Which frequently gets people into trouble when they try to use Op-Amps as Comparators: ... TI: Op Amps and Comparators - Don't Confuse Them Operational amplifiers (op amps) and comparators look similar; they even have very similar schematic symbols. This leads a lot of designers to think they are interchangeable. There is a strong temptation to use a spare section of a multiple op amp package as a comparator to save money. This application note will explain why designers should not do this. http://encon.fke.utm.my/nikd/latest/sloa067.pdf Download .pdf (sloa067.pdf, 150 Kbytes)" Not to butt in, but...wow, that is a VERY informative article...Thanks for sending that URL! -Dave -- Dave McGuire Cape Coral, FL ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
> Which frequently gets people into trouble when they try to use > Op-Amps as Comparators: There do seem to be comparators in the size, speed, and type I need; although not as plentiful as op amps. Specs: * push-pull output (they drive both P and N MOSFETS). * 1MHz or so (~1uS delay) * <= 0.65mm pitch (ideally, 0.5mm) * 3.3-5v Vcc The lines will (initially, at least) carry 1wire (1-15 uS pulses) and RS-232 (9600 baud). ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
> > I'll look into it. The thing about op amps is that they're cheap > > and tiny. > > Which frequently gets people into trouble when they try to use > Op-Amps as Comparators: I don't mind using comparators as long as they're tiny. You know, if I keep on "just trying stuff" I'll eventually learn everything, since each time I post an idea I get a bunch of neat stuff to read about :-) ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
On Thursday 02 November 2006 12:51, DJ Delorie wrote: > > Be sure to check how long it takes the op-amps to come out of > > saturation if you intend to use this for high-speed signals. > > Comparators (ones with totem-pole outputs) are usually better suited > > to this application. > > I'll look into it. The thing about op amps is that they're cheap and > tiny. Which frequently gets people into trouble when they try to use Op-Amps as Comparators: Analog Devices: "Issue 11: Comparators & Op Amps – May They Never Meet (Or Good Advice From Mr. Punch) The Question: Why buy an expensive comparator when an op amp is just as good? Download this article [pdf, 364,544 bytes]" http://www.analog.com/en/content/0,2886,760%255F788%255F87112,00.html TI: Op Amps and Comparators - Don't Confuse Them Operational amplifiers (op amps) and comparators look similar; they even have very similar schematic symbols. This leads a lot of designers to think they are interchangeable. There is a strong temptation to use a spare section of a multiple op amp package as a comparator to save money. This application note will explain why designers should not do this. http://encon.fke.utm.my/nikd/latest/sloa067.pdf Download .pdf (sloa067.pdf, 150 Kbytes)" To go along with the PDP-5, here are some Op-Amp notes from 1963 & 1966: http://focus.ti.com/docs/apps/catalog/resources/appnoteabstract.jhtml?abstractName=sboa092a -- http://www.softwaresafety.net/ http://www.designer-iii.com/ http://www.unusualresearch.com/ ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
> Be sure to check how long it takes the op-amps to come out of > saturation if you intend to use this for high-speed signals. > Comparators (ones with totem-pole outputs) are usually better suited > to this application. I'll look into it. The thing about op amps is that they're cheap and tiny. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: furnace controller I/O port again
On 11/1/06, DJ Delorie <[EMAIL PROTECTED]> wrote: I played with the op-amp idea, and actually got a working prototype on proto-board. http://www.delorie.com/pcb/io_port4.sch The "out" (line-driving) op amps come in a tiny dual-amp package, and the use of resistor dividers and ability to swap +/- inputs lets it drive the two MOSFETs directly. The "in" (sensing) op amp uses a divider to bring 0-5v down to 0-3.3v, with the reference suitable for both 3.3v CMOS and 5v TTL levels (effectively 1.65v). That op amp is available in a SOT-325 package, making it about as big as a transistor. The use of op-amps also nicely solves the voltage conversion issue, letting me run the R8Cs at 3.3v while still driving the thermostat lines at 5v. Be sure to check how long it takes the op-amps to come out of saturation if you intend to use this for high-speed signals. Comparators (ones with totem-pole outputs) are usually better suited to this application. Regards, Mark [EMAIL PROTECTED] -- You think that it is a secret, but it never has been one. - fortune cookie ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: furnace controller I/O port again
I played with the op-amp idea, and actually got a working prototype on proto-board. http://www.delorie.com/pcb/io_port4.sch The "out" (line-driving) op amps come in a tiny dual-amp package, and the use of resistor dividers and ability to swap +/- inputs lets it drive the two MOSFETs directly. The "in" (sensing) op amp uses a divider to bring 0-5v down to 0-3.3v, with the reference suitable for both 3.3v CMOS and 5v TTL levels (effectively 1.65v). That op amp is available in a SOT-325 package, making it about as big as a transistor. The use of op-amps also nicely solves the voltage conversion issue, letting me run the R8Cs at 3.3v while still driving the thermostat lines at 5v. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user