Sorry for not getting back sooner - but you have posed a lot of good questions that needed time to be answered!
> I've been reading your solar panel pages avidly, since making a solar panel
> and using a laptop, plus a kit from http://www.phanderson.com, which uses a
> pre-programmed PIC and DS1820's.
Preparing a kit seems a good idea - I may take a leaf out of Mr Anderson's book.
> However, it seems silly to use a laptop, as I'm sure the PIC could do
> everything that needs to be done, once I've bought the programmer and
Yes. My stand alone solar panel controller does that. (And has done that for the last 2 years.)
> Trouble is, I'm proficient in C, but I've only dabbled in assembly.
Dabble away. Knowledge of assembler is really useful. Cut your teeth on a PIC! They're well organised.
> I'm a bit bamboozled by your program cont208.asm.
Maybe I should revisit the code and tart it up a bit! There is unnecessary code that identifies the ROM ID of each DS1820. This is not really needed as only 1 DS1820 is allowed per pin. But the display and hotbox applications expect to see it...
> I don't think I need anything as complicated as you have done - I simply
> plan to measure two temperatures (solar panel & top of immersion heater),
> and if they differ by say, 3 degrees, put the pump on for say, 2 minutes,
> before going back to monitor the temperature again - unless you think this
> won't work properly for some reason, or is inefficient
Aha. The thing is you want as much energy from the panel as possible.
Cold water enters your hot water cylinder at 15 degrees centigrade. Your gas
boiler heats up the top part of your cylinder to 50 degrees centigrade. On a
weak winter's day the solar panel will warm up the lower part of the cylinder
to, say, 30 degrees centigrade. A significant part of the heat collected will be
dissipated by the pipe work, and other collector inefficiencies. Trying to make
the panel work hotter will increase these inefficiencies.
You have to monitor the energy being delivered to the cylinder. Yes my controller design follows your simple design to kick off with. Once the pump is running the temperature across the cylinder coil is monitored.
I'm only concerned with the temperature difference.
If it's negative - I'm loosing heat: turn off the pump!
If it's less than 2 degrees, it's not worth running the pump:
it would better to use the pump as a heater by immersing it into the cylinder!
This is why I ended up with 3 probes. One on the panel, the others across the cylinder coil.
> But I'm a PIC ignoramus ..., and you're obviously an expert ....
No I'm not an expert - I'm just familiar with micro-controllers.
> I don't suppose you have any smaller bits of assembly code, which simply
> gets a single temperature from the DS1820 and puts it into a register, which
> I could study.
No - I have no simple code examples. I may revisit the code - see if I can clarify things.
There are C compilers for the device. I have chosen not to use them - I think they add a layer of complexity. You end up debugging the compiler, not your application. ( No, I don't use that argument when I'm programming Windows!)
> How many lines of assembly code (instructions) can you get into a PIC16C84
> Is your code dependant on the clock frequency ? If so, what is it ?
Yes - only for the serial comms asynchronous data.
2.4576 MHz - this is a standard part
> Do you know if it is possible to use PICS without external clocks? ie Use
> it's internal clock to do its 'clocking' ?
Yes The oscillator can be put into RC (Resistor Capacitor) mode. This would not be stable enough for serial comms asynchronous data. But if you did not need that timing critical data - then RC mode may be suitable.
Back to the Controller designs page