Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: Can anyone modify the PIC on the M2?

  1. #1
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406

    Can anyone modify the PIC on the M2?

    Piabu was working on this for me, and I've since found out that he recently passed away. He had already modified a PIC for me, but I asked him for another with some other custom settings. I'd work on this myself, but I don't know anything about assembly, and I don't have a programmer for the PIC. He didn't provide me with the source for the chages he made, or I could probably figure out where the differences are and go from there. I have no problem paying a reasonable amount to someone who is willing to have a go at this. I can mail my old (factory) PIC if one is needed.

    This is what I'd like done:

    Have Jumper A modified to set either a 30min/45min (when not shorted) or a 45min/1hr timing (when shorted)
    Have Jumper B modified to set either always on (not shorted) or always off (shorted)
    Have jumper C modified so that when not shorted, use timings set by jumper A, and when shorted, use settings for jumper B

    I can't think of anything useful for jumper D, and i'm open to suggestion. The one thing I remember Piabu saying is that the M2 reads the Jumpers at startup, so in order to register changes in jumpers while the unit is on, the jumper states will need to be polled every few seconds.

    I'd also like the AMP line to go off and on with the IGN line, but only while the computer is on. For example, I pull up to a store and turn the car off. I want carpc to stay on, but the AMP line turn off. Now if I come back to the car within the timeout period, and turn the IGN back on, the the AMP line should come on also (with maybe a 1sec delay to allow for engine cranking). If the timeout expires and the M2 shuts down carpc, then I want the AMP line to function as normal with the anti-thump delay. I know this sounds confusing, and if it's too much to do, then i'm sure I can do what I need to with a relay or two, I'd just like to cut down on some wiring if possible.

    I"m going to use 2 switches, an ON-OFF to set Jumper A, and an ON-OFF-ON to set Jumpers B and C at the same time.

    Thanks for reading, PM me or post here if you have any questions

    Trevor


  2. #2
    FLAC evandude's Avatar
    Join Date
    Mar 2005
    Location
    Maine
    Posts
    937
    I might be able to help out somewhat. I don't own an M2-ATX, but I am fairly proficient with PICs so I might be able to make the necessary modifications if the original source code is relatively readable (and well commented, ideally)

    I recall someone saying the M1/M2 source was freely available online, but I don't know exactly where. Please put up a link to where I can check out the source code (or email it to me, my username here @gmail.com).
    But don't take it from me! here's a quote from a real, live newbie:
    Quote Originally Posted by Viscouse
    I am learning buttloads just by searching on this forum. I've learned 2 big things so far: 1-it's been done before, and 2-if it hasn't, there is a way to do it.
    eegeek.net

  3. #3
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    Here's the link to the source code:

    http://www.epiacenter.com/downloads/itatx2.zip

    Thanks


  4. #4
    FLAC evandude's Avatar
    Join Date
    Mar 2005
    Location
    Maine
    Posts
    937
    nice, it's well-commented, straightforward, and all in one ASM file, I'll see what I can figure out.

    Just to get your requirements straight, verify this for me:
    (using the same mode 0-7 description of the jumpers as used in the M2 manual)
    0) 30m/45m
    1) 45m/1h
    2) 30m/45m
    3) 45m/1h
    4) always on
    5) always on
    6) always off
    7) always off

    and you want to be able to switch modes while the computer is running? If so, I assume that if you switch it to "always off" while the computer is running, you want it to tell the computer to shut down, and then do a hard off after X amount of time? (how long?)

    Haven't started looking at the amp stuff yet.
    But don't take it from me! here's a quote from a real, live newbie:
    Quote Originally Posted by Viscouse
    I am learning buttloads just by searching on this forum. I've learned 2 big things so far: 1-it's been done before, and 2-if it hasn't, there is a way to do it.
    eegeek.net

  5. #5
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    Sweet. I really appreciate you looking into this. Just one question, can I send you my extra PIC to flash it? i don't have a programmer, and I've read that they are expensive.


  6. #6
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    Quote Originally Posted by evandude View Post
    nice, it's well-commented, straightforward, and all in one ASM file, I'll see what I can figure out.

    Just to get your requirements straight, verify this for me:
    (using the same mode 0-7 description of the jumpers as used in the M2 manual)
    0) 30m/45m
    1) 45m/1h
    2) 30m/45m
    3) 45m/1h
    4) always on
    5) always on
    6) always off
    7) always off

    and you want to be able to switch modes while the computer is running? If so, I assume that if you switch it to "always off" while the computer is running, you want it to tell the computer to shut down, and then do a hard off after X amount of time? (how long?)

    Haven't started looking at the amp stuff yet.
    Ok, the way it works now is that it uses all 4 jumpers to determine the timings. All i need is basically a on-off for each jumper.


    EX:

    X = Shorted, O = Open

    A B C D
    O O O O

    that would mean 30/45 min, always ON, Use timing set by jumper A, Unused

    A B C D
    X O X O

    That would mean 45/60 min, always on, use timing set by jumper B, Unused

    So in the first example, the always on setting is ignored because of jumper C. In the second example, the PSU is set to always on mode because of jumper C. that way if jumper C becomes open, it will revert to the 45/60 min as set by jumper A.

    Also, if it is set to always off while the computer is on, make it so that it uses whatever the current timing is set by Jumper A, then not come back on again until it's set to normal or always on mode.


  7. #7
    FLAC evandude's Avatar
    Join Date
    Mar 2005
    Location
    Maine
    Posts
    937
    I understand how the jumpers are set up, I'm just trying to verify your requirements.
    Look at page 2 of the M2-ATX manual:
    http://resources.mini-box.com/online...anual-engl.pdf
    for each of the numbers 0-7 that I just mentioned, there is a corresponding combination of jumpers. Look at the list I wrote and verify that the setting I listed for each number is the correct one for the corresponding jumper combination (for the behavior you want). I have listed them this way because in the code, the jumpers are just read collectively as a number from 0-7 (well actually it goes higher than 7, for some modes not documented in the manual which use jumper D as well, but you get the idea), so a 0-7 table such as that is how it will actually be implemented, and I just wanted to make sure I correctly translated your english-language description of the behavior into a table as it will be implemented; by staying as close as possible to the original implementation I'm less likely to mess up other parts of the program along the way. Since I don't have an M2-ATX to test the code with, the only way I can find out if my modifications work is to burn a chip and mail it you, obviously a slow and inconvenient process if there are any mistakes that need fixing; so I'm trying to keep the modifications as simple as I can to avoid errors.

    On that note, if there is anyone out there who has an M2-ATX and a PIC programmer and wouldn't mind doing some quick testing once I make some changes, that could save us some time.
    But don't take it from me! here's a quote from a real, live newbie:
    Quote Originally Posted by Viscouse
    I am learning buttloads just by searching on this forum. I've learned 2 big things so far: 1-it's been done before, and 2-if it hasn't, there is a way to do it.
    eegeek.net

  8. #8
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    I think this is what I want, and I think it makes sense

    Using the 2 switches that I plan to use, the jumper combinations for 2 and 3 aren't possible as the timing will be either 30/45 or 45/60 (Jumper A must be either on or off) and the other 2 jumpers can be set with the On-Off-On switch (On shorts C, but leaves B open for always on mode, Off leaves both B and C open, and the other ON shorts B and C for an always off. in the latter case, use either 6 or 7 and it should shutdown after the correct timing....i think)

    0 - 30/45
    1 - 45/60
    2 - unused
    3 - unused
    4 - always on
    5 - always on
    6 - always off after 30/45
    7 - always off after 45/60

    I really wish I was more familiar with this stuff, so I'd have somewhat of a clue in doing this.

    And I guess if you don't have a programmer and an M2 to test with, even if you do get the code we can't test it. Got any links to cheap programmers?


  9. #9
    FLAC evandude's Avatar
    Join Date
    Mar 2005
    Location
    Maine
    Posts
    937
    Quote Originally Posted by kamikaze2112 View Post
    And I guess if you don't have a programmer and an M2 to test with, even if you do get the code we can't test it. Got any links to cheap programmers?
    No, I do have a programmer. I also have a number of PICs including the 16F819 (which seemed to be the one on the M2, from the source code, is that correct?) so no rush on sending me one to program. I was just suggesting that if someone else had an M2 as well as a programmer and was interested in helping out as well then it could save some time, because otherwise I will have to burn one, send it to you, and hope it works when you try it, and if not, go through the mailing process all over again for each try. Sparkfun.com has some simple cheap programmers (PIC-PG2 socketed serial programmer is $13) but if you'd only use it for this project then it probably wouldn't be worth buying one, especially if you don't mind the mailing delay inherent in having me or someone else burn a chip for you.
    But don't take it from me! here's a quote from a real, live newbie:
    Quote Originally Posted by Viscouse
    I am learning buttloads just by searching on this forum. I've learned 2 big things so far: 1-it's been done before, and 2-if it hasn't, there is a way to do it.
    eegeek.net

  10. #10
    Variable Bitrate kamikaze2112's Avatar
    Join Date
    Feb 2005
    Location
    Barrie Ontario
    Posts
    406
    I almost wish i could live without my M2 to sent it to you for testing

    Did the table that I described make sense?

    And if you think this may take more than one try, I'd have no problem in ordering one of those programmers from sparkfun, especially if it saves time, plus with my case if i have to change the pic it means tearing carpc out of the car, and taking it all apart to get at the damn thing. $13 i can handle. I can always get rid of it on eBay if i need to when I'm done with it


Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 3
    Last Post: 01-06-2008, 03:11 PM
  2. Replies: 6
    Last Post: 07-06-2006, 10:28 PM
  3. Need help with PIC circuit
    By flipster125 in forum Hardware Development
    Replies: 23
    Last Post: 04-07-2006, 06:51 PM
  4. Show a update pic of you pet
    By thanatos106 in forum Off Topic
    Replies: 15
    Last Post: 06-28-2005, 01:59 AM
  5. PIC programming how to
    By MatrixPC in forum General MP3Car Discussion
    Replies: 6
    Last Post: 12-23-2003, 02:13 PM

Bookmarks

Posting Permissions

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