1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

PIC Home Alarm.

Discussion in 'Microcontrollers' started by Leo Garstman, Feb 24, 2016.

  1. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    This question is split off from the following thread:
    http://www.electro-tech-online.com/threads/16f877a-john-becker-home-alarm.130611/


    Hi All,
    I'm new here and i builded the alarm oke it is a old design bur it looks nice.
    All works i have only the problem that the buzzer not stops when alarm is on and entry time is passed>
    Can anyone help me on a workingHEX file?
    I,m a newbe in the PIC world but i have a programmer that works.

    I hope it thanks for reply

    Leo
     
    Last edited by a moderator: Feb 24, 2016
  2. DerStrom8

    DerStrom8 Super Moderator Most Helpful Member

    Joined:
    Aug 9, 2010
    Messages:
    5,484
    Likes:
    503
    Location:
    Vermont (GMT-5:00)
    Hi Leo, welcome to ETO!

    You should have started your own thread to ask this question. Hijacking others' threads is not allowed here. I have moved your question to its own thread.

    Please carry on the conversation here.

    Regards,
    Matt
     
  3. Little Ghostman

    Little Ghostman Well-Known Member Most Helpful Member

    Joined:
    Jan 7, 2011
    Messages:
    3,702
    Likes:
    426
    Location:
    SCOTLAND
    You are going to need the source code not the hex file for this, the hex file is kind of fixed (ok it isnt but pretend it is ), can you give more details and pics of the clock please, the more info= the more help :D hi and welcome.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0

    sorry i din't know that
     
  6. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,447
    Likes:
    188
    Location:
    Lancashire UK
    It looks like there have been some updates to the firmware since the original article in April 2002 Here is a link to one version of the firmware which contains a source file.

    ftp://ftp.epemag.wimborne.co.uk/pub/PICS/PICalarm/

    Inserting this as a link does not seem to work. It leaves out the : after ftp at the beginning of the URL You will have to copy and paste it into the address bar of your browser
    Les.
     
    Last edited: Feb 25, 2016
  7. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    thanks Les this is the update 2006 and i have it , but this file the buzzer is always on and i can't program at all :)
     
  8. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,447
    Likes:
    188
    Location:
    Lancashire UK
    You now have the source file so you can change it to behave as you want it to.

    Les.
     
  9. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    Yes i know, i hace the asm and hex but i can't program at all so i do'nt know how to change and find the problem :)
     
  10. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    I read just now the txt from Ghostman sorry , my eyes are very bad .
    I have uplodaded the two files i have in this msg .
     

    Attached Files:

  11. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    this is the whole discription and circuit
     

    Attached Files:

  12. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,447
    Likes:
    188
    Location:
    Lancashire UK
    When you say "i can't program at all" do you mean that you do not have the hardware / software to program a .hex file into the PIC ? Or do you mean that you cannot program in PIC assembler. ( So you do not know how to look in the code to see where pin 8 of the PIC (RE0) is set high or low) If the fault is in the firmware it seems unlikely that no one else has noticed such an error and reported it so it could be fixed in such a long time. Are you sure that there are no solder splashes shorting tracks on the board. One possible place there could be a short is where the track goes between pins 7 and 8 of the PIC. If it was shorting to pin 8 it would cause this fault.

    Les.
     
  13. Colin

    Colin Member

    Joined:
    Sep 25, 2003
    Messages:
    374
    Likes:
    22
    Location:
    Australia
    The buzzer is on pin 8 of the micro. Remove the buzzer and put a LED and 330R in its place. Take the other end of the LED to 0v.
    Is the LED illuminated?
     
  14. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,447
    Likes:
    188
    Location:
    Lancashire UK
    Hi Colin,
    From the schematic there is already an LED (D10) on the board as an indicator. It connect between ground and pin 8 (RE0) of the pic via a 470R resistor. The buzzer is driven by a TIP120 darlington transistor who's base is driven from RE0 via a 10K resistor. It is possible that the transistor could have failed colector emitter short circuit which would drive th e buzzer all the time. If this was the case then D10 should still go on and off.

    Les.
     
  15. ericgibbs

    ericgibbs Well-Known Member Most Helpful Member

    Joined:
    Jan 4, 2007
    Messages:
    21,189
    Likes:
    644
    Location:
    Ex Yorks' Hants UK
    Quote from previous thread.

    hi Leo,
    Ref your PM.
    I did find alarm415d.asm, so I have re-assembled using Oshonsoft and it created alarm415d.hex, both attached, hope it helps.
    The xtal is 3.2768Mhz
    Eric
     

    Attached Files:

  16. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,447
    Likes:
    188
    Location:
    Lancashire UK
    I've just had a quick look at the source listing. There are many places in the code where PORTE,0 is cleared. It is cleared at power on so at least the buzzer should be off then. I think it is more likely to be a hardwre fault than a firmware fault.

    Les.
     
  17. Leo Garstman

    Leo Garstman New Member

    Joined:
    Feb 24, 2016
    Messages:
    7
    Likes:
    0
    Thank you so much everyone.

    I send this Hex file to the Pic and the buzzer stays still on after alarm is set so i check tomorrow the hardware again.
    Now the other outputs working fine and in the first software not so a think the set this off.
    And Les, i know how to get a HEX file intoa pic but i cant's program the software by my self thats what i mean.
    I hear you say why you build it , because i love electronics diy :)
     
  18. Little Ghostman

    Little Ghostman Well-Known Member Most Helpful Member

    Joined:
    Jan 7, 2011
    Messages:
    3,702
    Likes:
    426
    Location:
    SCOTLAND
    Sorry I read from your post you had the Hex code, I didnt realize you had access to the source code. The source code means you can change what you like, sorry for the confusion
     
  19. kushan

    kushan New Member

    Joined:
    Jun 1, 2017
    Messages:
    3
    Likes:
    0
    I'm a hobbyist, i like this project very much,but i have a problem to make hardware part. sir cant find 3.2768 MHz crystal in my region.can modified codes(whitch part of asm file) for 4/8/10/Mhz crystal?pls i like and want to make this help me to solve this problem...can u send me a all codes files..i want and still learning pic programming.(still 0 but i try)
     

Share This Page