I have found SEROUT/SERIN to be very reliable. The sender makes a short pulse on the serial line before sending the data. The receiver has an interrupt set up on the serial line to start the SERIN process. It wouldn't work if the receiver has any code that might block the interrupt.
The values I...
I tried to program an 08M using the AXE026 download cable - the one that connects to the laptop serial port. All a bit retro but there were reasons.
I got "Hardware not found" error so I ran the Download Cable Test. It passed the continuity test but the Voltage test showed +5.8V when 5V was...
I was moved to devise a simple way to connect a keyboard facility to a Picaxe for occasional use. My original project (still not much further progressed) is a clock/calendar that can give reminders/alarms with explanatory messages at the appropriate times.
After some delving/research/Googling...
Something happens (probably!): WIth switch at Up, U is printed by the first IF statement then the second IF immediately causes Blank to be printed where the U was placed. The U disappears and it all happens so quickly that you don't see it. I think you need an IF... ELSEIF structure e.g.
You prompted me to check what the difference is between pins and outpins. In Manual 2, under "Readouputs" (never noticed that command before!) I found:
The current state of the output pins can be read into a variable using the
readoutputs command. Note that this is not the same as...
I simulated a short program to try to find what I can do with pinsB:
pinsb = 5
At first I was disappointed to see that pinsB stayed=0 according to the view in Code Explorer/System Variables but b1 and b2 came out as...
Thanks for all the suggestions. I have tested marks' suggestion and it works in the simulator. It's also short and doesn't need any extra variables. I just wish I understood how it works.
Where does 26317 come from?
I want to calculate a PWM period from 163,200/x where x is a word variable in the range 640 to about 2000. I could do it thus: 40800/x*4 (163200/4=40800) but then the result loses resolution and changes in steps of 4.
Is there a way to rearrange the arithmetic to achieve resolution in steps of 1?
Yes, right. You don't even need to know whether b0 is the low end or the high end of w0. It gets into the correct place provided you don't alter the order b0, b1, b2, b3, b4, b5 between serout and serin.
Thanks for those suggestions. I am particularly drawn to the Morse code scheme as it needs only an extra LDR, and is so quaintly retro. I had to learn Morse code for a sailing exam about 30 years ago. Never used it since.
I have an idea for a project to make a Calendar/Clock/Diary. It would use the MSF radio clock (already got that working in other projects) but the problem is a keyboard. Something small and discrete is needed, probably not normally connected to the project. I have this USB Wireless keyboard in...
You could use something like this:
SYMBOL lowbyte = b2
SYMBOL highbyte = b3
' Assign values to be saved in s_w0
lowbyte = 15
highbyte = 75
' Assign low byte of s_w0 without altering high byte
s_w0 = s_w0 / 256 * 256 + lowbyte
' Assign high byte of s_w0 without altering low byte...
I have recently noticed that several links to datasheets from the store (e.g. from the 18 pin project board) are dead. They start www.rev-ed.co.uk/docs . There's nothing there. The datasheets themselves still contain references to these addresses in their content too.
I've been around long...
Found it. In Settings/Editor/Margin/Display Bookmark Margin must be ticked to show a column left of the line numbers. That's where to click to set a breakpoint and it's where the red flag appears.
According to Manual 1 , p68 "
Breakpoints can be placed in (removed from) the program by simply clicking
over the line number in the margin. Alternatively the Breakpoints > Toggle
breakpoint menu may be used to insert/remove a breakpoint at the current cursor
position. Breakpoints are indicated...