Maker Pro
Maker Pro

Need a bit of PIC programming

G

Glenn Ashmore

OK, you guys convenced me to go to a microcontroller on my fuel transfer
system. I have laid out an outline of the program I need which is
relatively simple (I think) but turning it into an assembler program is way
beyond me. I do have a PIC programmer that I have used for some published
code but I also have a boat to finish so there is little time to learn
assembler right now.

Basically you set the number of gallons to be transferred with a rocker
switch which is displayed on a 3 digit LED, press a start button for the
tank you want to draw from and run a pump until the pulse count from a flow
transducer equals the requested amount. Faults are source tank empty,
target tank full and no pulses from the transducer. Also there is a
calibration subroutine.

Anyone interested in looking at my outline and maybe turning it into code?
Can't pay much but I can offer a weekend of sailing out of Savannah in
spring of '06 in exchange.

--
Glenn Ashmore

I'm building a 45' cutter in strip/composite. Watch my progress (or lack
there of) at: http://www.rutuonline.com
Shameless Commercial Division: http://www.spade-anchor-us.com
 
L

Luhan Monat

Glenn said:
OK, you guys convenced me to go to a microcontroller on my fuel transfer
system. I have laid out an outline of the program I need which is
relatively simple (I think) but turning it into an assembler program is way
beyond me. I do have a PIC programmer that I have used for some published
code but I also have a boat to finish so there is little time to learn
assembler right now.

Basically you set the number of gallons to be transferred with a rocker
switch which is displayed on a 3 digit LED, press a start button for the
tank you want to draw from and run a pump until the pulse count from a flow
transducer equals the requested amount. Faults are source tank empty,
target tank full and no pulses from the transducer. Also there is a
calibration subroutine.

Anyone interested in looking at my outline and maybe turning it into code?
Can't pay much but I can offer a weekend of sailing out of Savannah in
spring of '06 in exchange.

Next time your boat sails thru Phoenix, drop me a line ;>
 
M

Mark Jones

Glenn said:
OK, you guys convenced me to go to a microcontroller on my fuel transfer
system. I have laid out an outline of the program I need which is
relatively simple (I think) but turning it into an assembler program is way
beyond me. I do have a PIC programmer that I have used for some published
code but I also have a boat to finish so there is little time to learn
assembler right now.

Basically you set the number of gallons to be transferred with a rocker
switch which is displayed on a 3 digit LED, press a start button for the
tank you want to draw from and run a pump until the pulse count from a flow
transducer equals the requested amount. Faults are source tank empty,
target tank full and no pulses from the transducer. Also there is a
calibration subroutine.

Anyone interested in looking at my outline and maybe turning it into code?
Can't pay much but I can offer a weekend of sailing out of Savannah in
spring of '06 in exchange.


PIC assembler really isn't that hard. Just with any assembler, it can be
tedious. If you're using a PIC16F877 or other midrange PIC, it only has about 35
mnemonics. They can be learned in a day if diligent, because they are all
straightforward such as BTFSC - Bit Test File register (ram) and Skip [next
instruction] if Clear.

If you don't want to code in assembler, may I suggest JAL. It's like pascal or
basic, very easy to use and free of course. Here's a sample of JAL code:

-- name : e0001.jal
-- author : Wouter van Ooijen
-- date : 21-Sep-1998
-- purpose : jal example
-- This program flashes a LED on pin A0

include 16f84_10 ; target configuration: 16F84 with 10 Mhz Xtal
include jlib ; standard library

pin_a0_direction = output ; configure pin A0 as output

forever loop ; endless loop
pin_a0 = on ; LED on
delay_1s ; wait a second
pin_a0 = off ; LED off
delay_1s ; wait 1 second again
end loop ; repeat ad infinitum

JAL binary: http://sourceforge.net/projects/jal
JAL YahooGroup: http://groups.yahoo.com/group/jallist/messages

-- "God might not play dice with the universe, but he sure can bowl when it's
raining!" MCJ 20041222
 
Top