Pic program

Discussion in 'The Projects Forum' started by ConradH, Oct 6, 2010.

  1. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Can anyone out there please program a PIC/AVR/ for me. I obviously will provide full details later on , but the basic outline is a stand-alone sequential relay switchbox (1-16) with single input trigger. There are some delays involved as well.

    ConradH
     
  2. darkfish

    New Member

    Aug 17, 2010
    4
    0
    Certainly, where are you?
     
  3. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Do you just need the micro programmed? or do you need the driving circuit as well?
     
  4. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    I can program a PIC and now an AVR (recently got an AVRISP programmer.) However, it's going to be far better sending your code to Microchip who will program chips for you and ship them to you.
     
  5. ke5nnt

    Active Member

    Mar 1, 2009
    384
    15
    Are you wanting someone to actually write the code for you, or do you have code and just need it flashed into the PIC?
     
  6. AlexR

    Well-Known Member

    Jan 16, 2008
    735
    54
    Not for a single chip its not.

    Read the fine print!
    "Setup fee $29.00",
    "Minimum production order cost $60.00"
     
  7. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Hi all

    Thank you very much for the response. To answer the questions. I am from South Africa and need a programmed chip in a working circuit. I do have access to various CAD programs, so component layout etc. is not yet requiered (but if you insist).

    Just to add - our ROE makes using the bigger companies quite prohibitive.

    60 Euro equates to approx R750.00 excluding bank charges and that is enough to put a damper on any project.

    Cheers

    Conrad
     
  8. retched

    AAC Fanatic!

    Dec 5, 2009
    5,201
    312
    Tell us what you need friend, then me can help.

    Is this something you dont want to talk about in the open?

    If not, let it be known, and get your answer.

    I do not have a problem programming a chip and sending it to you, others will also.

    You pay for the uC, the shipping and a sandwich ;)

    Do you have any idea what uC you want to use?

    If you need the coding done, and you need a micro to take an input and convert that to 16 outputs (to close relays I am guessing) that is not too difficult.

    Adding additional delays (from as short as a microsecond or so) is also not difficult.

    What is the shortest and longest delay you will need?

    For the coding, you will have to upgrade the sandwich to a lunch. ;)
     
  9. No Chance

    New Member

    Oct 7, 2010
    4
    0
    It is a nice and helpful subject
    Later I will work in a project that needs PIC
     
  10. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Hi everyone

    No, there is nothing "secret" about the project. The aim here is to synchronize the probe-arm of an autosampler (scientific instrument) with the switching of solenoids. The arm - via its own software - selects a sample and send it to the instrument to get analyzed. The idea is to monitor up to 16 sample lines repetitively and in sequence (important). My first circuit used a microswitch to select the solenoid (as trigger) and with some gates complete the sequence (4017). Together with 555 timers I managed to get it to work quite well, but it was very cumbersome. I am also now limited to the amount of reset inputs for synchronization as I do not want to rebuild the whole circuit. If it easier for you guys out there, a trial program will work for now, as I can then provide input in the final outcome before the final flash.
    Has anybody heard of "modbus"?. It is used in some PLC circuits. The one manufacturer ( Adam? ) uses it in its external IO boards. They have a very nice unit available which have a processor ( 8051 ), input lines, serial port and relays on board. If it makes things easier, we can go that direction as well

    Thank for all the interest.

    Conrad
     
  11. bertus

    Administrator

    Apr 5, 2008
    15,645
    2,344
  12. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Hi Everyone

    Does the offer for the "lunch" still stand?

    Conrad
     
  13. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    So you need to poll the logic level of 16 lines, and have 16 outputs?

    What are the timing requirements and voltage levels for each of the inputs and outputs?

    This is pretty straightforward if it isn't a Mhz level clock, it could be done with a 20 pin PIC using 4-1 Logic ICs for more I/O. Speed is sacrificed, but if it is a simple:
    "poll input, if x, set output y if true/false, else poll next input" thing with kHz polling requirements, it would suffice, and the program would be fairly simple to write.

    Debugging might be an issue, though, without more information.
     
  14. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Looking at the formula is the exact reason why I am asking that somebody else do this for me.[​IMG]

    The input trigger is a micro/opto switch at 5volt dc. To make things easier the output level can be logic high, as I would then just use a driver cct afterwards. I want the outputlines to be user adjustable for up to 16 lines. What about a bcd thumbwheels switch, or a bank of dipswitches? somewhere in the dataline inputs??
    If possible I would like the output delays to be adjustable as well. i.e the solonoid staying switched for this set time
    Dipswitces/bcd thumbwheels or pot in delays of about 10 secs to 2 mins?
    The accuracy is not that critical (5%), so I would assume Khz polling would be good enough.
    I am trying to get a flow chart going (EXCEL) and would send it on if requiered.

    Conrad

    As I described in previously, I have built the circuit using gates and 555 timers, but it really is cumbersome.
     
  15. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Accuracy doesn't have anything to do with the polling frequency. The polling frequency of a few kHz would be sufficient for slow changing inputs.

    Do you have an oscilloscope? It won't be crucial, but will make debugging much easier.
     
  16. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Shows you how much I know about the subject. [​IMG]

    Yes I have a scope.

    Conrad
     
  17. tom66

    Senior Member

    May 9, 2009
    2,613
    213
    Great... what frequency are the inputs changing at normally? Once an hour, once a second, 100 times a second?
     
  18. thatoneguy

    AAC Fanatic!

    Feb 19, 2009
    6,357
    718
    This sounds like the best deal you will find so far, ConradH!

    For varying the number of I/O, you could simply leave the unused inputs tied to +5V or GND (Depending on high or low logic), and ignore the extra outputs, as they wouldn't change. This is assuming that looking at each input only 1000-2000 times per second is fast enough.

    Having the delays software configurable as above, as well as number of active I/O through a dedicated PC Program, as mentioned in the post by Alberto, would seem to solve any of he debugging issues I had.
     
  19. ConradH

    Thread Starter New Member

    Oct 5, 2010
    7
    0
    Hi Guys

    No, it is 1 input (trigger), with up to 16 sequentially switched outputs (current ic mc 4017) The trigger input is about 5 minutes apart, with the switched relay on for that predetermined adjustable time. When the sequence is complete it must start again with relay 1
     
Loading...