There is several ways to do it and it all depends on what degree of resolution you need from your readings.180R doesn't sound like much to put into a voltage divider setup. Is there some way I can do it differently, say with an OP AMP?
GET is a BASIC program command to retrieve data from X1/X2 scratchpad memory.... hook it up to a 28X2. I went back and found the code, but it wont compile due to syntax errors here:
SYMBOL get = b11
SYMBOL byte = b12
SYMBOL rsbit = b13
You've used the 4-bit LCD interface and my tutorial currently only covers the 8-bit interface (because it's easier and less likely to scare off the newbies) but I might add a 4-bit one as well.I found Nicks explanation easier to follow,but I think it uses different pis as it says :
pins = bytee & %11110000 | rsbit ; Put MSB out first
SYMBOL BKLT = 1
SYMBOL RS = 2 ; 0 = Command 1 = Data
SYMBOL E = 3 ; 0 = Idle 1 = Active
SYMBOL DB4 = 4 ; LCD Data Line 4
SYMBOL DB5 = 5 ; LCD Data Line 5
SYMBOL DB6 = 6 ; LCD Data Line 6
SYMBOL DB7 = 7 ; LCD Data Line 7
SYMBOL RSCMDmask = %00000000 ; Select Command register
SYMBOL RSDATmask = %00000100 ; Select Data register
SYMBOL retrve = b11
SYMBOL bytee = b12
SYMBOL rsbit = b13
PowerOnReset:
GOSUB InitialiseLcd
DisplayTopLine:
EEPROM 6,("Hello")
FOR retrve = 6 TO 10
READ retrve,bytee
GOSUB SendDataByte
NEXT
MoveCursorToStartOfSecondLine:
bytee = $C0
GOSUB SendCmdByte
DisplayBottomLine:
EEPROM 11,("World!")
FOR retrve = 11 TO 16
READ retrve,bytee
GOSUB SendDataByte
NEXT
END
InitialiseLcd:
FOR retrve = 0 TO 5
READ retrve,bytee
GOSUB SendInitCmdByte
NEXT
' Nibble commands - To initialise 4-bit mode
EEPROM 0,( $33 ) ; %0011---- %0011---- 8-bit / 8-bit
EEPROM 1,( $32 ) ; %0011---- %0010---- 8-bit / 4-bit
' Byte commands - To configure the LCD
EEPROM 2,( $28 ) ; %00101000 %001LNF00 Display Format
EEPROM 3,( $0C ) ; %00001100 %00001DCB Display On
EEPROM 4,( $06 ) ; %00000110 %000001IS Cursor Move
; L : 0 = 4-bit Mode 1 = 8-bit Mode
; N : 0 = 1 Line 1 = 2 Lines
; F : 0 = 5x7 Pixels 1 = N/A
; D : 0 = Display Off 1 = Display On
; C : 0 = Cursor Off 1 = Cursor On
; B : 0 = Cursor Steady 1 = Cursor Flash
; I : 0 = Dec Cursor 1 = Inc Cursor
; S : 0 = Cursor Move 1 = Display Shift
EEPROM 5,( $01 ) ; Clear Screen
RETURN
SendInitCmdByte:
PAUSE 15 ; Delay 15mS at 4MHz
SendCmdByte:
PEEK $30,rsbit ; Recover Out0 and Out1
rsbit = rsbit & %11 ; Send to Command register
GOTO SendCmdOrDataByte
SendDataByte:
PEEK $30,rsbit ; Recover Out0 and Out1
rsbit = rsbit & %11 | RSDATmask ; Send to Data register
SendCmdOrDataBye:
pins = bytee & %11110000 | rsbit ; Put MSB out first
PULSOUT E,1 ; Give a 10uS pulse on E
pins = bytee * %00010000 | rsbit ; Put LSB out second
PULSOUT E,1 ; Give a 10uS pulse on E
RETURN
That is code written specifically for an 18X I believe and it won't work for other chips without alteration and it's not ideally suited to alteration.here is the code as I have it now.
That sounds like the way to go Pete. Do you have a pinout and package of the chip?My best advice is if 10 bit ADC (picaxe) is not a good enough result then drive down the road and visit me, and i will give you a 16 bit ADC chip (albeit SMD) to try out.
I havent checked your design to see if the I2C pins are free to use such a chip ( hint i always reserve the I2C pins as a last resort to be used in a circuit design)
0.88 Bar is about 12.76 PSI and to get that you would need about 30 foot head of water, so i would expect your pressure sensor will be working down in the bottom 1/3 of its range, that is not a lot of difference to work with..8Bar. I`m hoping that is enough pressure.
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
SYMBOL lcddata = pinsb
Main:
high BL ;turn on backlight
dirsb = 255 ;set pinsb to output
low RS
output ENT
pause 100
lcddata = %00000010 : pulsout ENT,30 'Clear display
pause 10
lcddata = %00111000 : pulsout ENT,30 'Function Set: 8-bit, 2 lines, font 8x5
pause 20
lcddata = %00001100 : pulsout ENT,30 'Display on/off control: Display on, cursor off, blink off
pause 20
lcddata = %00000111 : pulsout ENT,30 'Entry mode set: Increment, cursor shift
pause 20
text:
lcddata = %00000001 : pulsout ENT,50 'return home
pause 20
low rs
lcddata = 128 : pulsout ENT,1
high rs
for b4 = 0 to 40
lookup b4,(" TANK PUMP MONITOR TIME: "),lcddata
pulsout ENT,1
next
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
SYMBOL lcddata = pinsb
Main:
high BL ;turn on backlight
dirsb = 255 ;set pinsb to output
low RS
output ENT
pause 100
lcddata = %00000010 : pulsout ENT,30 'Clear display
pause 10
lcddata = %00111000 : pulsout ENT,30 'Function Set: 8-bit, 2 lines, font 8x5
pause 20
lcddata = %00001100 : pulsout ENT,30 'Display on/off control: Display on, cursor off, blink off
pause 20
lcddata = %00000111 : pulsout ENT,30 'Entry mode set: Increment, cursor shift
pause 20
text:
lcddata = %00000001 : pulsout ENT,50 'return home
Pause 20
low rs
lcddata = 192 : pulsout ENT,1
high rs
for b5 = 0 to 19
lookup b5,("<- MENU "),lcddata
pulsout ENT,1
next
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
SYMBOL lcddata = pinsb
Main:
high BL ;turn on backlight
dirsb = 255 ;set pinsb to output
low RS
output ENT
pause 100
lcddata = %00000010 : pulsout ENT,30 'Clear display
pause 10
lcddata = %00111000 : pulsout ENT,30 'Function Set: 8-bit, 2 lines, font 8x5
pause 20
lcddata = %00001100 : pulsout ENT,30 'Display on/off control: Display on, cursor off, blink off
pause 20
lcddata = %00000111 : pulsout ENT,30 'Entry mode set: Increment, cursor shift
pause 20
text:
lcddata = %00000001 : pulsout ENT,50 'return home
pause 20
low rs
lcddata = 128 : pulsout ENT,1
high rs
for b4 = 0 to 40
lookup b4,(" TANK PUMP MONITOR TIME: "),lcddata
pulsout ENT,1
next
lcddata = %00000001 : pulsout ENT,50 'return home
Pause 20
low rs
lcddata = 192 : pulsout ENT,1
high rs
for b5 = 0 to 19
lookup b5,("<- MENU "),lcddata
pulsout ENT,1
next
lcddata = %00111011 : pulsout enable,16 'Function Set: 8-bit, 2 lines, font 11
lcddata = %00000001 : pulsout enable,608 'Clear display
lcddata = %00001100 : pulsout enable,608 'Display on/off control: Display on, cursor off, blink off
[B]lcddata = %00000110[/B] : pulsout enable,16 'Entry mode set: Increment, cursor shift
Hmmm.. Dumb mistakes by me.. I am a bookbinder and proof read every day, yet i didnt see the obvious mistakes. Have it working now. Thanks NickThe first issue is that you have enabled display shifting by setting the least significant bit in the Entry Mode Set instruction to 1. Below is the code from my tutorial where the relevant bit is a 0.Additionally you used the Return Home instruction instead of Clear Display in your display initialization.Code:lcddata = %00111011 : pulsout enable,16 'Function Set: 8-bit, 2 lines, font 11 lcddata = %00000001 : pulsout enable,608 'Clear display lcddata = %00001100 : pulsout enable,608 'Display on/off control: Display on, cursor off, blink off [B]lcddata = %00000110[/B] : pulsout enable,16 'Entry mode set: Increment, cursor shift
The second problem with the combined code is that you've tried to send the clear display instruction (it's not return home as the comment says) while the RS pin is high. But all this should do is display CGRAM character 1.
If you need more pins, use a PICAXE-40X2. Serial LCDs1. If you need to save pins (and/or code space) use serial displays like the AXE133Y instead of driving the display with you project Picaxe.
Just so you understand why that line fails,So I changed the reserved words to see if the code would run, but it has an error in this line:
Code:pins = bytee & %11110000 | rsbit ; Put MSB out first
How? I have never had a problem even with multiple serial devices receiving data multiple times per program loop.If you need more pins, use a PICAXE-40X2. Serial LCDscanwill cause problems with interrupts, timers, servos, background i2c, background hardware serial and others so it's best to avoid them if there is the possibility that one of those will be needed or they are needed.
But those are all devices that receive serial from the PICAXE. The problems occur when the PICAXE has to be receiving the serial data or another IC is the i2c master and the PICAXE has to obey whatever clock signal speed it wants to use.How? I have never had a problem even with multiple serial devices receiving data multiple times per program loop.
I think you are confusing I and O.But those are all devices that receive serial from the PICAXE. The problems occur when the PICAXE has to be receiving the serial data or another IC is the i2c master and the PICAXE has to obey whatever clock signal speed it wants to use.
No I'm not. Using the serout command to control the LCD will disable all interrupts and cause problems with any interrupt-based things like background hardware i2c slave mode, timers and background hardware serial.I think you are confusing I and O.
My comments were directed at the output LCD which appears to use 7 pins on the Picaxe and consumes quite a bit of (complex) program space. On the input side three Picaxe pins for buttons are trivial as is the code to implement them.
Due to your high post count I'll defer somewhat.No I'm not.
I have never experienced any of these problems even though I have used timers and the DS1307 via i2c extensively with serial for LCD and data logging to SD cards. I don't want to drag this thread off course so your insistence should quickly provide proof via a code sample, reference to documentation or relevant forum posts. Failing that this discussion needs to move to another thread.Using the serout command to control the LCD will disable all interrupts and cause problems with any interrupt-based things like background hardware i2c slave mode, timers and background hardware serial.
1. I know I could use a smaller picaxe if I wished, and use an axe133. I have done so previously. I am treating this as a learning experience to see if I can nut out my project using one microcontroller. I have a crude plan of how I want to do it. I will use slot 1 to set up or change the RTC and any functions I need to set up the OLED, and possibly use a data eeprom for other settings that would not be held when moving slots. Being mindful of the issue Nick has mentioned, then move to the second slot for the program itself, using interupts to control manipulation of the switches, OLED and pump etc.If I have read this thread correctly here is my 2 cents:
1. If you need to save pins (and/or code space) use serial displays like the AXE133Y instead of driving the display with you project Picaxe.
2. If you have enough battery power to run a pump for 5 minutes it's doubtful you need to be terribly concerned with power saving.
Good idea - some relevant forum threads:I have never experienced any of these problems even though I have used timers and the DS1307 via i2c extensively with serial for LCD and data logging to SD cards. I don't want to drag this thread off course so your insistence should quickly provide proof via a code sample, reference to documentation or relevant forum posts. Failing that this discussion needs to move to another thread.
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
SYMBOL lcddata = pinsb
symbol seconds = b10
symbol mins = b11
symbol hour = b12
symbol day = b13
symbol date = b14
symbol month = b15
symbol year = b16
symbol control = b17
setup:
output ENT ;set c.7 as output
high BL ;turn on backlight
dirsb = 255 ;set pinsb to output
low RS ;command register
pause 100
lcddata = %00000001 : pulsout ENT,2 'Clear display
pause 10
lcddata = %00111000 : pulsout ENT,2 'Function Set: 8-bit, 2 lines, font 8x5
pause 10
lcddata = %00001100 : pulsout ENT,2 'Display on/off control: Display on, cursor off, blink off
pause 10
lcddata = %00000110 : pulsout ENT,2 'Entry mode set: Increment, cursor shift
pause 10
Main: ;set PICAXE as master and DS1307 slave address
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte 'set up RTC on I2C
hi2cin 0,(b10,b11,b12,b13,b14,b15,b16,b17) 'read RTC
debug
pause 50
low rs 'command register
lcddata = %00000010 : pulsout ENT,2 'return home
pause 10
low rs 'command register
lcddata = 128 : pulsout ENT,2 'Line 1
high rs 'Data register
for b4 = 0 to 16
lookup b4,(" TANK CONTROLLER"),lcddata
pulsout ENT,2
next
low rs 'command register
lcddata = 192 : pulsout ENT,2 'Line 2
high rs 'data register
BCDTOASCII b12,b19,b20 'Change BCD to ASCII for transmission to LCD
BCDTOASCII b11,b21,b22
BCDTOASCII b10,b23,b24
for b4 = 0 to 25
lookup b4,(" TIME ",b19,b20,":",b21,b22,":",b23,b24," <-MENU"),lcddata
pulsout ENT,2
next
goto main
I'd put that and similar in subroutines so the code becomes easier to use and more self explanatory. That can make it simpler to confirm code is correct and make it easier to debug and maintain ...low rs
lcddata = 128 : pulsout ENT,2
high rs
Does it work?Can anyone suggest any improvements to it?Marz.
'outputs
SYMBOL lcddata = pinsb
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
'DS1307 variables
symbol seconds = b10
symbol mins = b11
symbol hour = b12
symbol day = b13
symbol date = b14
symbol month = b15
symbol year = b16
symbol control = b17
'DS1307 display variables
symbol hr10 = b19
symbol hr01 = b20
symbol mn10 = b21
symbol mn01 = b22
symbol sc10 = b23
symbol sc01 = b24
setup:
output ENT ;set c.7 as output
high BL ;turn on backlight
dirsb = 255 ;set pinsb to output
low RS ;command register
pause 100
lcddata = %00000001 : pulsout ENT,2 'Clear display
pause 10
lcddata = %00111000 : pulsout ENT,2 'Function Set: 8-bit, 2 lines, font 8x5
pause 10
lcddata = %00001100 : pulsout ENT,2 'Display on/off control: Display on, cursor off, blink off
pause 10
lcddata = %00000110 : pulsout ENT,2 'Entry mode set: Increment, cursor shift
pause 10
Main: ;set PICAXE as master and DS1307 slave address
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte 'set up RTC on I2C
hi2cin 0,(seconds,mins,hour,day,date,month,year,control) 'read RTC
debug
pause 50
low rs 'command register
lcddata = %00000010 : pulsout ENT,2 'return home
pause 10
low rs 'command register
lcddata = 128 : pulsout ENT,2 'Line 1
high rs 'Data register
for b4 = 0 to 16
lookup b4,(" TANK CONTROLLER"),lcddata
pulsout ENT,2
next
low rs 'command register
lcddata = 192 : pulsout ENT,2 'Line 2
high rs 'data register
BCDTOASCII hour,hr10,hr01 'Change BCD to ASCII for transmission to LCD
BCDTOASCII mins,mn10,mn01
BCDTOASCII seconds,sc10,sc01
for b4 = 0 to 25
lookup b4,(" TIME ",hr10,hr01,":",mn10,mn01,":",sc10,sc01," <-MENU"),lcddata
pulsout ENT,2
next
goto main
#picaxe 28x2
'constants
SYMBOL LCDbaud = n2400_8
'outputs
SYMBOL LCDpin = B.1 'AXE133Y
'DS1307 variables
symbol secs = b10
symbol mins = b11
symbol hour = b12
symbol day = b13
symbol date = b14
symbol month = b15
symbol year = b16
symbol control = b17
'DS1307 display variables
symbol hr10 = b19
symbol hr01 = b20
symbol mn10 = b21
symbol mn01 = b22
symbol sc10 = b23
symbol sc01 = b24
setup:
pause 1000
i2cslave %11010000, i2cslow, i2cbyte 'set DS1307 slave address
Main:
readi2c 0,(secs,mins,hour,day,date,month,year)
bcdtoascii hour,hr10,hr01
bcdtoascii mins,mn10,mn01
bcdtoascii secs,sc10,sc01
serout LCDpin, LCDbaud,(254,1) 'clear display
pause 30
serout LCDpin, LCDbaud,(254,128," TANK CONTROLLER")
serout LCDpin, LCDbaud,(254,192," TIME ",hr10,hr01,":",mn10,mn01,":",sc10,sc01," <-MENU")
pause 10000
goto main
Yes it doesDoes it work?
You could indent the code in for...next loops to make it easier to read.Can anyone suggest any improvements to it?
Will do Nick. Thanks again for the tutorial on parallel interfacing. It`s where I got most of the info from to get this far.You could indent the code in for...next loops to make it easier to read.
SYMBOL BL = c.5 ;BACKLIGHT
SYMBOL RS = C.6
SYMBOL ENT = c.7
SYMBOL lcddata = pinsb
SYMBOL seconds = b10
SYMBOL mins = b11
SYMBOL hour = b12
SYMBOL day = b13
SYMBOL date = b14
SYMBOL month = b15
SYMBOL year = b16
SYMBOL control = b17
setup:
dirsb = 255 ;set pinsb to output
dirsc = 7 ;set pinsc
high BL ;turn on backlight
low RS ;command register
pause 100
lcddata = %00000001 : pulsout ENT,2 :pause 10 'Clear display
lcddata = %00111000 : pulsout ENT,2 :pause 10 'Function Set: 8-bit, 2 lines, font 8x5
lcddata = %00001100 : pulsout ENT,2 :pause 10 'Display on/off control: Display on, cursor off, blink off
lcddata = %00000110 : pulsout ENT,2 :pause 10 'Entry mode set: Increment, cursor shift
Main: ;set PICAXE as master and DS1307 slave address
hi2csetup i2cmaster, %11010000, i2cslow, i2cbyte 'set up RTC on I2C
hi2cin 0,(b10,b11,b12,b13,b14,b15,b16,b17) 'read RTC
pause 50
low rs 'command register
lcddata = %00000010 : pulsout ENT,2 'return home
pause 10
low rs 'command register
lcddata = 128 : pulsout ENT,2 'Line 1
high rs 'Data register
for b4 = 0 to 16
lookup b4,(" TANK CONTROLLER"),lcddata
pulsout ENT,2
next
low rs 'command register
lcddata = 192 : pulsout ENT,2 'Line 2
high rs 'data register
BCDTOASCII b12,b19,b20 'Change BCD to ASCII for transmission to LCD
BCDTOASCII b11,b21,b22
BCDTOASCII b10,b23,b24
for b4 = 0 to 25
lookup b4,(" TIME ",b19,b20,":",b21,b22,":",b23,b24," <-MENU"),lcddata
pulsout ENT,2
next
if pina.3 = 1 then goto SETMENU1
goto MAIN
SETMENU1:
gosub SCREENCLR
for b4 = 0 to 28
lookup b4,("* SET CLOCK *******"),lcddata
pulsout ENT,2
next
LOW RS
lcddata = 192 : pulsout ENT,2
pause 10
high rs
for b4 = 0 to 28
lookup b4,(" DAYLIGHT SAVING *******"),lcddata
pulsout ENT,2
next
wait 1
do
if pina.3 = 1 then goto SETMENU2
loop
SETMENU2:
gosub SCREENCLR
for b4 = 0 to 28
lookup b4,(" SET CLOCK XXXXXXX"),lcddata
pulsout ENT,2
next
LOW RS
lcddata = 192 : pulsout ENT,2
pause 10
high rs
for b4 = 0 to 28
lookup b4,("* DAYLIGHT SAVING XXXXXXX"),lcddata
pulsout ENT,2
next
wait 1
do
if pina.3 = 1 then goto SETMENU3
loop
SETMENU3:
gosub SCREENCLR
for b4 = 0 to 28
lookup b4,(" SET CLOCK * XXXXXXX"),lcddata
pulsout ENT,2
next
LOW RS
lcddata = 192 : pulsout ENT,2
pause 10
high rs
for b4 = 0 to 28
lookup b4,(" DAYLIGHT SAVING XXXXXXX"),lcddata
pulsout ENT,2
next
wait 1
do
if pina.3 = 1 then goto SETMENU4
loop
SETMENU4:
gosub SCREENCLR
for b4 = 0 to 28
lookup b4,(" SET CLOCK XXXXXXX"),lcddata
pulsout ENT,2
next
LOW RS
lcddata = 192 : pulsout ENT,2
pause 10
high rs
for b4 = 0 to 28
lookup b4,(" DAYLIGHT SAVING * XXXXXXX"),lcddata
pulsout ENT,2
next
wait 1
do
if pina.3 = 1 then goto SETMENU3
loop
SCREENCLR:
low rs
lcddata = %00000001 : pulsout ENT,2 'Clear display
pause 10
lcddata = %00000010 : pulsout ENT,2 'reuturn home
PAUSE 10
lcddata = 128 : pulsout ENT,2 'line 1
pause 10
high rs
RETURN
I'm going to comment. Marz, you are free to follow whatever course you choose working on your project. My comments are for the benefit of the many lurkers that show up in the page counts.That`s about the limit of my knowledge as to efficiency, so any possible improvements anyone can suggest would be great.
There is a good starting point! Sensing water flow and stopping the pump after 5 minutes will give you an immediate benefit and make sure the project is viable. There is little point in continuing unless you can get this core bit of functionality 100% reliable.Hi everyone. I am starting a new project. I want to build a controller for my rainwater tank.
I want the controller to:
Limit the pump to run for a maximum of 5 minutes before shutting off the pump
Great second bit of programming to add. You don't have to be able to set the clock from a UI to do this. Get the desired functionality working first then add the UI. Might be easier to use an output from the irrigation system to bypass your Picaxe output though...UNLESS it is in a specified time period set to coincide with the irrigation system.
Here is a good third bit of HW and SW. The first two bits could be up and running while you got this working on a second breadboard. Once you have this working I'd add in functionality to prohibit or modify irrigation if the tank level was below a certain level.check the water level in the tank via a pressure sensor in the outflow pipe at the bottom of the tank.
Great ideas along with the UI stuff - once everything else is working.Dorji 433 MHz modules to also receive info onto a remote lcd screen (or in a perfect world an app on my computer)and a piezo to operate when tank low or time exceeded.
Glad you took my comments as intended. I'm not trying to tic people off...@lewisg. Thanks for the input.
Have you tried on of these: HRXL-MaxSonar-WRM ?The original idea has been through a lot of changes, mainly because of the tank level sensor.
You are apparently quite handy with that mill! Nice boards!I did use a similar approach to you and your lathe when getting my first milling machine going. everything was held together with rubber bands and sticky tape until I could get it making its own parts. Since then it has made me a new gantry mill with a VFD spindle and refitted a lathe to be CNC also. I cheated on the electronics though. Went out and bought geckodrives. As you said, get things going ASAP when you have spent all that money.
Marz.
I have come up with the easiest solution (that I have found). I use diptrace for schematics and pcb layout. Export to mach3 for drill files(mirrored), export dxf (mirrored) bottom edge and cutout. Import DXF into D2NC(if sold with Mach3 it is really cheap but on its own still very cheap for all it can do) inside of mach3 to set up speeds/feeds and depths. and voila! boards can be milledYou are apparently quite handy with that mill! Nice boards!
GUI on!
gosub SCREENCLR
for b4 = 0 to 10
lookup b4,("* SET HOURS"),lcddata
pulsout ENT,2
next
LOW RS
lcddata = 192 : pulsout ENT,2
pause 10
high rs
for b4 = 0 to 27
lookup b4,(" SET MINUTES <-ACCEPT"),lcddata
pulsout ENT,2
next
low rs
lcddata = %00000010 : pulsout ENT,2 :pause 10 'move cursor home
lcddata = 144 : pulsout ENT,2 '128 + cursor moves
high RS
for b4 = 0 to 1
lookup b4,(b19,b20),lcddata : pulsout ENT,2
next
end
In what way does it not work; what does it do ?This dosen`t work
Only part of the code is there so I'm not sure, but don't you also need to convert the variables to ASCII first? This can be done using the bintoascii command.Sorry hippy. I just figured it out. I had rem`d out a line in the code I loaded. Oops!!
Marz
I looked up the LET command in the manual but I don`t understand how to use it in this instance. Can you give an example?Only part of the code is there so I'm not sure, but don't you also need to convert the variables to ASCII first? This can be done using the bintoascii command.
Also if you're only sending two bytes then a for : next loop is wasteful - simply use two separate let and pulsout commands.