Which chip do i use?


Closed Thread
Results 1 to 40 of 78

Hybrid View

  1. #1
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    Ive written some test code using DT's example

    Code:
    INCLUDE "DT_INTS-14.bas"     ; Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ; Include if using PBP interrupts
    
    resolution var byte
    x var byte
    
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler    INT_INT,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    @   INT_ENABLE   INT_INT     ; enable external (INT) interrupts
    
    Main:
        for resolution=0 to 100
            pause 1
        next
        for resolution=100 to 0 step -1
            pause 1
        next
    GOTO Main
    
    '---[INT - interrupt handler]---------------------------------------------------
    ToggleLED1:
        for x=100 to 1 step -1
            if resolution=x then
                high portd.7
            endif
            pauseus 150
        next
        low portd.7
    @ INT_RETURN
    It works perfectly except the bulb fades out half way then pauses slightly then fades out completely. It also fades as its coming back in. Does anyone know why that is and how to fix it?

  2. #2
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I think ive been looking at this the wrong way round. Ive had the multimeter on one of the boxes Matt made (8 triacs are riveted to the side so i cant see under the PCB). From what i can see the interrupt pin isnt connected at all. I think he has a main loop which just waits for a certain pin to go low (for the zero-crossing) then executes the bit to control how bright everything is. As for the serial input i think that is where the interrupt comes in. Either that or there is no interrupt at all and he checks that in the main loop too. Now its starting to sound simple

    For now im gonna use the same chips Matt used and see if i can make his circuit work on a breadboard. Then i can copy the hex code to the new chips. That gives me 8 outputs so ill need 2 chips per circuit but they are cheaper than 1 big one.

    1 thing i find weird about his circuit is that MCLR doesnt appear to be connected to anything :S

  3. #3
    Join Date
    Mar 2006
    Location
    China
    Posts
    266


    Did you find this post helpful? Yes | No

    Default I'm out of here

    Hi,

    Reverse engineering is not my favorite game so do not expect any more help from me again.

    Need any more help? Ask Matt!

    /me

  4. #4
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I would ask Matt but hes never online anymore. Hes always busy.

    From what ive learned in this thread and looking at the top of his PCB i think i can see how and why he has connected certain things up. Im gonna get hold of a 16MHz resonator and borrow one of the chips from the boxes. If i can get one of the origional chips to work then i could simply copy the code but i have an idea of how he programmed it too so i can also experiment with that.

    Whats wrong with reverse engineering anyway? I tend to learn best by seeing a finished product then looking at all the bits in it to see how it works. It also leads to me question why it has been done in such a way. Like why does Matt appear to have used a method that nobody has mentioned here?

  5. #5
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Like why does Matt appear to have used a method that nobody has mentioned here?
    You would have to ask him. There are many ways to do the same thing. Is one better than the other, who knows. This thread was not started about why some one did a project a certain way. It was about which chip would work. Then it went on to interrupts.

    As far as reverse engineering.

    Using it to lean is one thing but to duplicate a product is on the verge of stealing.
    If the product is open source that is something else.
    Want to build a device that works like one made by someone else, fine. Use your own ideas and you will get help on how to make them work. Want it to be exactly like the one made by another, buy one from them.
    Dave
    Always wear safety glasses while programming.

  6. #6
    Join Date
    Jun 2007
    Location
    Mansfield, UK
    Posts
    697


    Did you find this post helpful? Yes | No

    Default

    I dont want it to be exactly the same. Thats why im putting so much effort into learning this. Im doing loads of tests on Matts box now and theres a few things i still dont get but im getting there. Just about to try some code out (stuff i invented myself). But im gonna put it on one of the boxes Matt made. I know the box works perfect so i can test my code better. Once i get my code working then it will help me understand the circuit better.

    I dont want to "copy" Matts design. I want to figure out how he did it then do it in my own way

  7. #7
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    OK

    Some chips have an internal MCLR , I like these for ICSP.

    Let us know how you code works out and where you need help from there.
    Dave
    Always wear safety glasses while programming.

Similar Threads

  1. Trouble with PIC16F88 (chip hangs up)
    By nobner in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 20th January 2009, 09:23
  2. Camera with PIC chip
    By The Master in forum Off Topic
    Replies: 5
    Last Post: - 1st July 2008, 14:28
  3. More info on L4620 liquid sensor chip
    By Nicmus in forum Documentation
    Replies: 4
    Last Post: - 1st June 2008, 23:03
  4. TV Display Chip
    By zadok in forum mel PIC BASIC Pro
    Replies: 19
    Last Post: - 17th April 2008, 22:17
  5. chip selection aid
    By PICMAN in forum General
    Replies: 4
    Last Post: - 21st February 2005, 18:33

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts