1. OCAU Merchandise now available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion here.
    Dismiss Notice

Easiest beginner PLC/PIC programming

Discussion in 'Electronics & Electrics' started by bradrogers, Jul 16, 2006.

  1. fref99

    fref99 Member

    Joined:
    Aug 11, 2002
    Messages:
    839
    Location:
    Switzerland
    Hi,

    If you can get a Mega8 board (the chip only costs about 1.5 Euro) but has 8Kb code space, 1Kb ram, 28 I/O pins including 6 Analog inputs. Have a look in Ebay.

    You can pickup USB programmers, I'm still using an old STK200/300 clone (parallel port) which I banged up for about 8Euro.

    Have you had a look at the MCSelec website http://www.mcselec.com/ (the makers of Bascom), they seem to have several programmers but their in Europe.

    I Started off with a AT902313 (2Kb code space/128byte ram) which was enough for afew "games" but soon went over to the Mega8 due to Analoge inputs/more code space.

    Regards
    FREF99
     
  2. Caffeine

    Caffeine Member

    Joined:
    Jul 1, 2003
    Messages:
    1,576
    Location:
    Sydney
    FREF99's experience pretty much mirrors mine. I started with a AT90S2313 and a DT006 dev board from www.dontronics.com in Melbourne, using BASCOM AVR (I bought the full version)

    I've since moved on to custom made PCB's using bigger AVR's such as the ATMEGA128 etc, using GCC-AVR.

    In fact, I have 2 DT006's as I bought one as a kit but couldn't get it working, and then I bought one pre made and then got the kit one working. I don't use either of them anymore as I've moved on to the larger chips. I can send you one for postage costs only if you want, with a AT90S2313 mounted (in a DIP socket so you can remove the chip to put it in a breadboard etc)

    My contact details are in the free LCD thread.
     
  3. chief4

    chief4 Member

    Joined:
    Jan 5, 2004
    Messages:
    140
    Location:
    Perth
    The butterfly is an evaluation board, its pretty cool. If you wanted to use c you could get a kit of parts and book from www.smileymicros.com that is a pretty good way to start out.

    The stk500 is very nice too, its a development board from atmel, it usually comes with a atmega16 and an atmega8515 from memory. It uses a serial port but I use mine with serial to usb adaptor with no problems at all.
     
  4. fref99

    fref99 Member

    Joined:
    Aug 11, 2002
    Messages:
    839
    Location:
    Switzerland
    Hi,

    I would say away from the AVR Butterfly it's bit of an "odd ball" (Non standard LCD interface).

    Regards
    FREF99
     
  5. zfind

    zfind Member

    Joined:
    Sep 5, 2006
    Messages:
    3,560
    Location:
    Helsinki
    Thanks for the replies guys, you're really helping me find my way through all of the difficult choices. I spent some more time researching last night, and found this unit from futurelec: link

    It's for the ATMEGA16, so that should give me alot of usable space. It also seems to have alot of standard features that I could muck around with further down the line (it says it has analogue comparator - will that allow analog inputs?). It also has a nice breadboard area which is very useful. Best of all, its around $50 which is great.

    So if I were to get the above, could it be combined with this or this to allow me to work through USB or would I be better of just getting a USB to serial adapter/cable?

    btw, I've found DSE and Jaycar's ranges to be almost devoid of dev kits - strange?
     
  6. fref99

    fref99 Member

    Joined:
    Aug 11, 2002
    Messages:
    839
    Location:
    Switzerland
    Hi,

    The mega16 has 8 true ADC's, an analog comparator is nothing more than 2 inputs where the AVR sets a bit when port 1's voltage is higher than port 2. So to produce a simple ADC all you do is apply you "unknown" to pin 2 and slowly increase the voltage on pin 1 until the comparator bit is set.

    Both programmers should work, they both support ISP.

    Regards
    FREF99
     
    Last edited: Nov 28, 2007
  7. zfind

    zfind Member

    Joined:
    Sep 5, 2006
    Messages:
    3,560
    Location:
    Helsinki
    OK, a little update here. Thanks to Caffeine's generosity, I should be able to get started learning about MC programming with an AT90S2313. I've read up on it and even though it's a slightly older chip it should be fine for me to get started. Also good is that the code size restriction in BASCOM (2k) wont restrict how much I can write to this chip as that's how much it has anyway.

    Next step, power, connection to computer and breadboard. Power seems to be able to be taken care of with a simple wall wart that gives out 9v at 300mA. Connecting to the computer will have to be via USB (Chief4 - do you just use a serial-usb adapter or cable or do you have some sort of pcb unit?). Breadboard connection is there on the DT006, just have to work out how to wire it up :)

    Should be fun!

    EDIT: just saw this re: breadboard connection:
    "J1 1 x 30 pin female R/A header strip."
    "J1 Will allow you to very simply connect to a proto or vero board for outboard development."
     
    Last edited: Nov 29, 2007
  8. jboles

    jboles Member

    Joined:
    Jun 19, 2004
    Messages:
    2,408
    Location:
    Sydney NSW / Seattle USA
    Damn..... many months on and this stuff is still on my todo list.....

    Out of interest, do any of the boards (at least the ones targetted at hobbyists) come with a book of projects?
     
  9. Caffeine

    Caffeine Member

    Joined:
    Jul 1, 2003
    Messages:
    1,576
    Location:
    Sydney
    Yep, plugs right into a breadboard. It also has SimmStick headers on there (look like old EDO RAM slots), into which you can plug a variety of pre-made modules, or little protoboards.
     
  10. zfind

    zfind Member

    Joined:
    Sep 5, 2006
    Messages:
    3,560
    Location:
    Helsinki
    OK cool, I had an inkling that it wouldn't be too hard given the allowances the makers had made for outside connections. Would it just be a matter of buying of buying a breadboard from Jaycar or similar and it will fit or will I need to solder it together or modify the breadboard?

    Sorry for the newb questions, it's been a while :sick:
     
  11. Caffeine

    Caffeine Member

    Joined:
    Jul 1, 2003
    Messages:
    1,576
    Location:
    Sydney
    The header is standard 100mil pitch (0.1in, 2.54mm), so a cheap white breadboard will do fine
     
  12. chief4

    chief4 Member

    Joined:
    Jan 5, 2004
    Messages:
    140
    Location:
    Perth
    I just use an aten brand usb to rs232 serial converter cable like this one, but any brand should work ok.
     
  13. alxx

    alxx Member

    Joined:
    Jun 21, 2003
    Messages:
    430
    Location:
    Northern Beaches
     
  14. alxx

    alxx Member

    Joined:
    Jun 21, 2003
    Messages:
    430
    Location:
    Northern Beaches
    check out smiley micros www.smileymicros.com
    They sell a book and a kit with a avr butterfly etc
     
  15. chief4

    chief4 Member

    Joined:
    Jan 5, 2004
    Messages:
    140
    Location:
    Perth
    I bought that kit and book about a year or so ago and I think it was very good. definately recommend it, you can download the first few chapters from his website for a preview of the book. Its based on WinAVR which is free and open source C compiler, it uses GCC. The author is a regular contributor on the forums at www.avrfreaks.net too.
     
  16. zfind

    zfind Member

    Joined:
    Sep 5, 2006
    Messages:
    3,560
    Location:
    Helsinki
    Cool, I'll have a read of the intro chapters and see how I like it.

    I just ordered a GPS from DealExtreme and they just happened to have an RS232-USB adapter, so that's on the way now too - should have a nice little devlab sitting on my table soon! :)

    Just to keep things happening while I wait for stuff to arrive, the 'ultimate' project I'd like to eventually build up to is some sort of "Room Radar" as I call it. I've envisioned it as an ultrasonic emitter/receiver positioned on a servo that is set to sweep left to right (and possibly up/down). The signals received could then be analysed by an application on the PC and compiled into a live ultrasonic "image" of the room. I could then build some sort of motion detection into it and make it do nasty terminator-style target tracking etc. Sounds pretty advanced but I guess it's a goal to head towards!
     
  17. Alper

    Alper Member

    Joined:
    Oct 8, 2005
    Messages:
    2,610
    Location:
    3060
  18. huckleberry

    huckleberry Member

    Joined:
    Feb 18, 2003
    Messages:
    673
    Location:
    Melbourne
    :lol: :lol: :lol: That is absolutely fantastic, thankyou!
     
  19. link1896

    link1896 Member

    Joined:
    Jul 28, 2005
    Messages:
    368
    Location:
    Melbourne
    even easier is picaxe


    I started with picaxe by accident. It had been 10 years since my last c programming class. I had to repair a device with a picaxe in it and was up to speed in 20 minutes (picaxes are done in basic), so someone who has never ever even contemplated what a microprocessor does would find picaxe a not too steep learning curve.



    .
     
  20. alxx

    alxx Member

    Joined:
    Jun 21, 2003
    Messages:
    430
    Location:
    Northern Beaches

Share This Page

Advertisement: