I have alot on atm but am working latres at work so I will be able to have a play with some code tonight (nothing ever goes wrong with the servers while im on lates..). ----- Original Message ----- From: "Nick Veys" To: Sent: Wednesday, June 20, 2001 2:37 PM Subject: Re: [PIC]: 16F84 project for newbie.... > Ack I didn't realize so many codes :) > > The idea you have there is pretty solid, 2 jumps to the right location... > could just incf a variable for each pulse, then jump off those 2 > variables... I'd be interested in seeing the final project if you make a > web page for it... :) > > nick@veys.com | www.veys.com/nick > > > -----Original Message----- > > From: pic microcontroller discussion list > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Justin Fielding > > Sent: Wednesday, June 20, 2001 8:28 AM > > To: PICLIST@MITVMA.MIT.EDU > > Subject: Re: [PIC]: 16F84 project for newbie.... > > > > > > There are about 90 something codes, the only way I could see of doing it > > would be to have lots of tables, and say.. in the example of the > > code being > > 25: > > x being 2, y being 5 > > > > > > PC+x > > ;1 goto sub fir1 > > ;2 goto sub fir2 > > ;3 goto sub fir3 > > > > ----------------- > > sub fir2 > > PC+y > > .... > > ;4 z=1 > > ;5 z=2 > > > > then it jumps back to where the lookup was first called and the value of z > > used in a final lookup to return the error string to the LCd. > > > > Is this what you menat? Sorry for the rushed example and crap > > typing but im > > just going out the door b4 im late for work.. > > > > Jsutin. > > > > > > ----- Original Message ----- > > From: "Nick Veys" > > To: > > Sent: Wednesday, June 20, 2001 2:19 PM > > Subject: Re: [PIC]: 16F84 project for newbie.... > > > > > > > To detect lengths of time elapsed you can use your TMR0 module. Figure > > out > > > how long of a delay it is to signify the code is complete and watch for > > it. > > > To get 1 & 2 to be 12, simply make code detect that sequence, there can > > only > > > be a few error codes, so you could just code for each one if you wanted, > > to > > > brush up on your assembly :) > > > > > > nick@veys.com | www.veys.com/nick > > > > > > > -----Original Message----- > > > > From: pic microcontroller discussion list > > > > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Justin Fielding > > > > Sent: Wednesday, June 20, 2001 8:04 AM > > > > To: PICLIST@MITVMA.MIT.EDU > > > > Subject: [PIC]: 16F84 project for newbie.... > > > > > > > > > > > > I am a newbie to Pic's (just got to the interrupts section in the > > > > Easy Pic'n book) and have thought of a great little project. I > > > > want to make a fault reader for my car's ECU. > > > > > > > > If the ECU detects a fault (can be simulated by disconnectiong > > > > something) then it pops the warning light on. You can then (bit > > > > of a quick hack) conect an LED accross two of the pins on the > > > > diagnostics port and short two out and it will flash a code > > on the LED. > > > > > > > > It first flashes 1 2 to let you know it is working, then the > > > > fault, say 2 6 and then 1 2 again. > > > > > > > > Trouble is it does this in a rather strange way, in the above > > > > example it would. > > > > > > > > Flash the LED once > > > > Short pause > > > > Flash the LED Twice > > > > Long pause (so the above was "1" then "2" but this should be > > read as 12) > > > > Flash LED Twice > > > > Short pause > > > > Flash the LED six times > > > > Long pause ( representing "2" then "6" or 26) > > > > and so on..... > > > > > > > > I would like to use an F84 with an input from the ECU (from where > > > > the LED goes) and then a LCD display to show what the fault is > > > > (use a lookup table here). > > > > > > > > Problem is how do I know the difference between the long and > > > > short pause (so I can stop counting flashes and move to the next > > > > digit) AND the big how... How do I turn "1" & "2" into 12 (for > > > > use in the lookup table)? > > > > > > > > Any help or tips from similar projects would be appreciated. > > > > > > > > Thanks. > > > > > > > > Justin. > > > > > > > > -- > > > > http://www.piclist.com hint: To leave the PICList > > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > > > > > > > > > -- > > > http://www.piclist.com hint: To leave the PICList > > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > > > > > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > -- > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu