My next project - Do I use a Spectrum or an old Laptop and GWBasic?? - Sinclair

This is a discussion on My next project - Do I use a Spectrum or an old Laptop and GWBasic?? - Sinclair ; Boys, I am in a quandry here and would like to canvass opinnion on the best way forward for my project. The goals of the project are :- 1 Monitor the voltages of my Solar panels (5 of them) 2 ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

  1. My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    Boys, I am in a quandry here and would like to canvass opinnion on the
    best way forward for my project.

    The goals of the project are :-
    1 Monitor the voltages of my Solar panels (5 of them)
    2 Monitor the voltages of the batteries.
    3 monitor 2 temperatures using the LM335 chip.
    4 Upload this data to my webside where RRDtool will store them via
    RS232.
    5 Display the voltages either on an HD44780 LCD ( I have loads of 2
    line LCD's) or an LCD screen of some kind.

    I was hoping to use the spectrum because: -

    1 Its easy to program
    2 Ive got residos and Compact Flash ram - ZXCF+
    3 Ive got an IO card (Interspec box with ADC built in and I/O and
    relays)
    4 Ive got spares for it - got about 10 spectrums lying around in
    different states of repair!
    5 I can use BASIC

    However, I am having diffculty with it!

    1 I built an extender board for the expansion slot but the compact
    flash deosnt like it and loses access to the CF card or corrupts
    residos and I have to reload it occasionally. I used ribbon for some
    of the connections and its this I dont think it likes! I really need
    to build a proper PCB to extend the expansion slot.
    2 The ZXCF+ gadget and RESIDOS clashes with the Interpec - I can
    probably get round this by hacking the ports on the Interpec - but its
    more work to do.
    3 I will have to use the IF/1 RS232 because any other rs232 designs
    are again a lot of work and though I can build PCB's, Its via the old
    method as I dont have the press on stuff and cant do through hole
    anyway - getting one offs made is expensive!
    4 The membranes are going on the spectrums so I need to buy a +3
    really! Not very cheap on ebay!

    So, I thought maybe I should use an old slow laptop and freedos with
    basic.

    The plus points are: -

    1 its all built in - LCD screen, keyboard and a bidirectional
    parrallel port, power supply, RS232
    2 Its stand alone
    3 I have more than one laptop so parts arent an issue
    4 I can interface an 8255 or similar to the parallel port and then the
    Interpec (Ive ran an LCD off one before.)

    Bad points -
    1 240 volts psu though as it runs off 18 volts DC I can hack a psu up
    from the bateries.
    2 Its not a spectrum which I love to bits!
    3 I am not very familiar with GWbasic or Qbasic 4.5 so there is a
    small learning curve
    4 dont know how well it would work.
    5 No crashing problems because of dodgy connections etc!
    6 Assume I can get a pcmcia card suitable for the laptop and woking in
    Freedos AND access the ip stack from basic to send the data to the
    webserver (though I have rs232 to fall back on and copy the data via
    another box I already have on)

    Paul dunns Sinclair type OS laptop sounds great, but that could be a
    while forthcomming and will likely have to mature because it becomes
    'what I need.

    Even using something like the Spectrum SE or ZX Badaloc is an issue -
    its goin to be a lot of work to get one of those up and running
    assuming you can make / buy a pcb and get all the bits programmed
    etc...

    Now I have written this down, the above analysis says to me I should
    really use the Laptop - but what do you guys think???


  2. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    Ql, Z88?

    Dunno, this almost sounds like it just needs a simple control application on
    a custom chip.

    Brian

    --
    Brian Gaff - briang1@blueyonder.co.uk
    Note:- In order to reduce spam, any email without 'Brian Gaff'
    in the display name may be lost.
    Blind user, so no pictures please!
    "dickydodds" wrote in message
    news:1188819425.893560.161030@22g2000hsm.googlegro ups.com...
    > Boys, I am in a quandry here and would like to canvass opinnion on the
    > best way forward for my project.
    >
    > The goals of the project are :-
    > 1 Monitor the voltages of my Solar panels (5 of them)
    > 2 Monitor the voltages of the batteries.
    > 3 monitor 2 temperatures using the LM335 chip.
    > 4 Upload this data to my webside where RRDtool will store them via
    > RS232.
    > 5 Display the voltages either on an HD44780 LCD ( I have loads of 2
    > line LCD's) or an LCD screen of some kind.
    >
    > I was hoping to use the spectrum because: -
    >
    > 1 Its easy to program
    > 2 Ive got residos and Compact Flash ram - ZXCF+
    > 3 Ive got an IO card (Interspec box with ADC built in and I/O and
    > relays)
    > 4 Ive got spares for it - got about 10 spectrums lying around in
    > different states of repair!
    > 5 I can use BASIC
    >
    > However, I am having diffculty with it!
    >
    > 1 I built an extender board for the expansion slot but the compact
    > flash deosnt like it and loses access to the CF card or corrupts
    > residos and I have to reload it occasionally. I used ribbon for some
    > of the connections and its this I dont think it likes! I really need
    > to build a proper PCB to extend the expansion slot.
    > 2 The ZXCF+ gadget and RESIDOS clashes with the Interpec - I can
    > probably get round this by hacking the ports on the Interpec - but its
    > more work to do.
    > 3 I will have to use the IF/1 RS232 because any other rs232 designs
    > are again a lot of work and though I can build PCB's, Its via the old
    > method as I dont have the press on stuff and cant do through hole
    > anyway - getting one offs made is expensive!
    > 4 The membranes are going on the spectrums so I need to buy a +3
    > really! Not very cheap on ebay!
    >
    > So, I thought maybe I should use an old slow laptop and freedos with
    > basic.
    >
    > The plus points are: -
    >
    > 1 its all built in - LCD screen, keyboard and a bidirectional
    > parrallel port, power supply, RS232
    > 2 Its stand alone
    > 3 I have more than one laptop so parts arent an issue
    > 4 I can interface an 8255 or similar to the parallel port and then the
    > Interpec (Ive ran an LCD off one before.)
    >
    > Bad points -
    > 1 240 volts psu though as it runs off 18 volts DC I can hack a psu up
    > from the bateries.
    > 2 Its not a spectrum which I love to bits!
    > 3 I am not very familiar with GWbasic or Qbasic 4.5 so there is a
    > small learning curve
    > 4 dont know how well it would work.
    > 5 No crashing problems because of dodgy connections etc!
    > 6 Assume I can get a pcmcia card suitable for the laptop and woking in
    > Freedos AND access the ip stack from basic to send the data to the
    > webserver (though I have rs232 to fall back on and copy the data via
    > another box I already have on)
    >
    > Paul dunns Sinclair type OS laptop sounds great, but that could be a
    > while forthcomming and will likely have to mature because it becomes
    > 'what I need.
    >
    > Even using something like the Spectrum SE or ZX Badaloc is an issue -
    > its goin to be a lot of work to get one of those up and running
    > assuming you can make / buy a pcb and get all the bits programmed
    > etc...
    >
    > Now I have written this down, the above analysis says to me I should
    > really use the Laptop - but what do you guys think???
    >




  3. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    On Sep 3, 12:37 pm, dickydodds wrote:

    > Even using something like the Spectrum SE or ZX Badaloc is an issue -
    > its goin to be a lot of work to get one of those up and running
    > assuming you can make / buy a pcb and get all the bits programmed
    > etc...


    The problem with the existing Spectrum SE design is that it doesn't
    actually specify an RS232 interface. My personal preference is for a
    Z80 SIO, or emulation thereof in FPGA or CPLD, using the same ports as
    the IF1. I am really hoping that the SE can be made available in kit
    form. It would certainly be up to the task from a processing point of
    view, but I suspect that you might well be better off going the old PC/
    FreeDOS route. I don't expect Dunny to have a working version of his
    OS available for quite a while yet, given his hectic life. I'm also
    inclined to agree with Brian that there's probably a simple control
    application solution there, although I think it might well run on a
    Z80 microcontroler rather than custom hardware.


  4. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    Do you have any of the Amstrad clones? They all have built-in RS232,
    and that way it wouldn't interfere with your CF interface.


  5. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    > I'm also
    > inclined to agree with Brian that there's probably a simple control
    > application solution there, although I think it might well run on a
    > Z80 microcontroler rather than custom hardware.


    Well youre right about that, as my original intention was to use an
    OOPIC microchip for the task. Ive actually done a lot of work with
    that chip already as it happens and I can send 2 i2c temperatures to a
    pc over rs232 (though they have their own probs with distance), but
    again, it comes down to ease of use! The oopic circuit is in the
    garage and to program it you have to write it on the pc and then
    upload it via a cable to the OOPIC - now I cant sit in the garage all
    night - the wife would kick me out!! Its also another dialect of basic
    to use....

    Actually, I suppose I could leave a laptop connected short term and
    remote control that from in the house till its finished.

    Maybe I am trying to make a mountain out of a molehill....


  6. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    On 2007-09-03, dickydodds wrote:
    > I was hoping to use the spectrum because: -
    >
    > 1 Its easy to program
    > 2 Ive got residos and Compact Flash ram - ZXCF+
    > 3 Ive got an IO card (Interspec box with ADC built in and I/O and
    > relays)
    > 4 Ive got spares for it - got about 10 spectrums lying around in
    > different states of repair!
    > 5 I can use BASIC


    ....and it will use less power than the solar panels will put out.
    Laptops are battery hogs compared to even a Speccy (even with the heat
    the ULA puts out). And it's not as much fun as an 8 bit project.

    Don't build an extender for the expansion slot, really, the bus should
    be relatively short even with the slow speed of a Speccy bus. Instead,
    use a cheap Atmel AVR microcontroller to do the actual monitoring at the
    remote end, with a little program that merely just stuffs the raw values
    through a simple serial data link. Something like an ATtiny2313 would
    probably suffice, uses only microamps, and has a built in ADC, analogue
    comparator and various other handy stuff. Then a simple bit-banging
    interface on the Spectrum to receive the serial data, and then massage
    it however you want. You can make a bit banging interface with a flip
    flop, tristate buffer and a 74HCT125 to decode the I/O ports. You can
    write the bit banging code in BASIC, using IN and OUT commands. It won't
    be fast but you're probably only transferring a few bytes so it hardly
    matters.

    --
    Yes, the Reply-To email address is valid.
    Oolite-Linux: an Elite tribute: http://oolite-linux.berlios.de

  7. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    On 4 Sep, 13:47, Dylan Smith wrote:
    > On 2007-09-03, dickydodds wrote:
    >
    > > I was hoping to use the spectrum because: -

    >
    > > 1 Its easy to program
    > > 2 Ive got residos and Compact Flash ram - ZXCF+
    > > 3 Ive got an IO card (Interspec box with ADC built in and I/O and
    > > relays)
    > > 4 Ive got spares for it - got about 10 spectrums lying around in
    > > different states of repair!
    > > 5 I can use BASIC

    >
    > ...and it will use less power than the solar panels will put out.
    > Laptops are battery hogs compared to even a Speccy (even with the heat
    > the ULA puts out). And it's not as much fun as an 8 bit project.
    >
    > Don't build an extender for the expansion slot, really, the bus should
    > be relatively short even with the slow speed of a Speccy bus. Instead,
    > use a cheap Atmel AVR microcontroller to do the actual monitoring at the
    > remote end, with a little program that merely just stuffs the raw values
    > through a simple serial data link. Something like an ATtiny2313 would
    > probably suffice, uses only microamps, and has a built in ADC, analogue
    > comparator and various other handy stuff. Then a simple bit-banging
    > interface on the Spectrum to receive the serial data, and then massage
    > it however you want. You can make a bit banging interface with a flip
    > flop, tristate buffer and a 74HCT125 to decode the I/O ports. You can
    > write the bit banging code in BASIC, using IN and OUT commands. It won't
    > be fast but you're probably only transferring a few bytes so it hardly
    > matters.
    >
    > --
    > Yes, the Reply-To email address is valid.
    > Oolite-Linux: an Elite tribute:http://oolite-linux.berlios.de


    WOW! Those chips are only 1.15 at farnell! The OOPIC cost me 40 plus
    and I have 3 now!! (OK, so I bought 2 of them cheap as they are the
    older firmware ones!)

    Well youre only saying what Brian said earlier - that the seperate
    controller is the best way so I am going to continue with the OOPIC
    route.
    I really did want to use the spectrum as its what I was brought up on,
    however, it is a hassle at the end of the day! I already have an RS232
    port on the oopic working so I can go straight to the PC with my own
    VB program receiving the data which, as you say, is peanuts - just a
    few bytes really.

    Perhaps I can use the speccy for a weather project in the future - or
    perhaps I will take a look at those cheap atmel chips!

    I appreciate the feedback - I knew you boys were the right guys to
    ask!!

    Cheers,
    Dicky


  8. Re: My next project - Do I use a Spectrum or an old Laptop and GWBasic??

    On 2007-09-04, dickydodds wrote:
    > WOW! Those chips are only 1.15 at farnell! The OOPIC cost me 40 plus
    > and I have 3 now!! (OK, so I bought 2 of them cheap as they are the
    > older firmware ones!)


    There are even cheaper ones, like the ATtiny13, which is something like
    75p.

    You will need to at least learn C to make the best of them, though. The
    reason why a microcontroller that can be programmed in BASIC is so
    expensive is you need a lot of other gubbins to make BASIC workable.

    C isn't as frightening as it looks - especially on a microcontroller. On
    a microcontroller, you don't need to learn huge amounts of obscure
    function calls because there aren't any, because you directly poke the
    hardware registers - and certainly avr-gcc makes this easy. For example,
    putting a value on port B is just a matter of doing PORTB = some_value.

    Sparkfun Electronics (www.sparkfun.com) have a tutorial for starting out
    with C on the AVR line of microcontrollers. The AVR range is pretty
    broad (goes from the diminutive ATtiny13, up to the really big ATmegas),
    and the AVR is better (IMHO) than the PIC from Microchip (the AVR
    executes most instructions in a single clock cycle, the PIC needs four.
    The AVR has a nicer instruction set, too).

    You can also make an AVR programmer out of nothing but a parallel cable
    and four 1K resistors (the 'BSD' programmer under the avrdude
    programming software, although this works with Windows and Linux too,
    it's not just for BSD).

    --
    Yes, the Reply-To email address is valid.
    Oolite-Linux: an Elite tribute: http://oolite-linux.berlios.de

+ Reply to Thread