Search results

  1. A

    Melexis to PICAXE

    Well there's your answer... The MLX90614xSF-Axx is spec'd down to 4.5v, and DOES NOT WORK reliably much below that. Run it with 4.7k at 5v, and all will be well. For other devices RTFM. This is what the spec says about the Clock line. Here are the SCL and SDA plots for my 614 running at...
  2. A

    Any PIC/SFR Experts?

    I2Csetup says: I can't find anything on setting the SSPADD register in the Microchip datasheet. The PICAXE values loaded for 'mode' are: SLOW 167,147,137 for 16M, 8M and 4M FAST 9, 4, 3 for 16M, 8M and 4M. I need to try to get down to a 10khz rate to feed a particularly nasty part that...
  3. A

    Any experience of GPS6MV1?

    I just got one of these. I was planning to start by using the GPS010 sample code - but I'm not sure how compatible it is. It uses a uBLOX 6M module, which seems to be similar to the GPS010. It has a 3.3V regulator allowing Vcc to be 3v to 5v, and an EEPROM for storing data I think. I've done a...
  4. A

    20M2 Loop Speed slower than expected

    I wrote some code to generate test signals, using the 'rule of thumb' 250uS per op - but it ran much slower than I expected. Breaking the code down to understand the bottleneck, I found that an 'empty' FOR/NEXT loop takes 1.6mS! Are there any techniques to 'loop' faster than this? Switched to...
  5. A

    PWMOUT and 4bit LCD Interface on same Port?

    Again I'm trying to do the unnatural! I use essentially Hippys 4bit LCD routines on pins B.2 to B.7 on the 20M2. Works well. There is a note in the archive that explains how to use B.0 and B.1 as outputs at the same time. I've used this method for simple outputs, again works well. However...
  6. A

    PWMOUT on 20M2 Off Frequency

    Once again I'm stuck with the simplest possible problem. (The hard ones I can usually fix) I need to generate a 8Khz square wave to test a piece of equipment. No problem, I thought! Used the PWM wizard, and got: #picaxe 20M2 #no_data pwmout B.1, 124, 250 Run it - nice square wave...
  7. A

    Splitting Long Lines

    "Added _\n (whitespace-underscore-newline) as line continuation for splitting long lines" I tried this in PE 5.5.0 but get Error: Unknown symbol - _ ?
  8. A

    RS232 download cable doesn't see 20M2

    I've set up a basic 20M2 breadboard to use a 'real' com port. I used the enhanced download circuit with the schottky clamp. (good practice :) ). 3 fresh AAs in battery pack, no connections to any pins other than 1,2,19 and 20. However all attempts to download a program have failed with...
  9. A

    Programming PICs - I need a favour

    I've need to burn a hex file into 3 28pin PICs, not PICAXES, but used for a PICAXE project. This is probably a one off deal and I really don't want the hassle of buying a pickit2, figuring out how to use it, installing software etc - just to do these 3. If there's a US based member that...
  10. A

    mS timer using a 20M2?

    I have need to measure a pin delay of a couple of seconds with a 20m2. I need mS resolution but not mS accuracy. If I had an X2 I could use timer3, but I don't - so how do I do it? I tried using a pause statement, terminated by an interrupt. But I have found no way of reading the remaining...
  11. A

    Conditional commands.

    That works 'correctly' in simulation: Main: for b7=2 to 5 for b8 =4 to 10 if b8=9 and b7=5 or b7=2 Then If flag = 0 Then gosub count_it flag = 1 Else flag = 0 End If Next b8 Next b7 goto main count_it: sertxd (#b7," ",#b8," ",#flag) Return So here we effectively get : b8=9...
  12. A

    Problem measurin RPM of an electric motor

    From the photo of your setup it looks as if the 'white' sector of your disk is in fact mirror like? You may find that painting it white or adding white tape will work better as it may actually 'scatter' more light back to the detector. Also check the spacing as the sensitivity drops off quite...
  13. A

    Project hiccup and need help please

    It should go to pin 5 of the 08M2 I think. But the wire from pin 11 should go to 1 not 2 I did an edited screenshot as a jpg!!!! Thanks guys....
  14. A

    Extending M2 named variables

    Inspired by Rays Blog http://www.picaxeforum.co.uk/entry.php?36-Extending-PICAXE-named-variables-by-300-or-more! I have written a couple of small subroutines to facilitate Bank Switching on M2s. They use no 'normal' variables at all.... They are demonstrated in the attached variation of Rays...
  15. A

    Reasonably Optimised Sin and Cos Functions for Picaxe

    I've recently mapped my 1990s vintage HC11 sin/cos approximation over to Picaxe 20M2 and figured it may be of interest. I used a combination of series expansions, Chebyshev polynomials and a bit of fine tuning. The code is about 115 bytes and gives 3+ significant figures over most of the...
  16. A

    Maintaining and Reusing Code

    Like others before I'm running into the problem of reusing code and keeping track of variables in biggish programs. There's a lot of very good info in http://www.picaxeforum.co.uk/showthread.php?9299-Writing-Maintainable-Picaxe-Code&highlight=modular and I'm using several of the techniques in...
  17. A

    Text Strings give Syntax Error

    From Manual 2 - pg 6: PE seems to accept only single characters? z2 = "1" is accepted, z2 has value $0031 z2 = "10" gives syntax error...
  18. A

    Unary Minus Supported?

    As a result of a typing mishit (!) while entering code I found that w1 = -w1 is accepted by the simulator, and gives the expected 2s Comp result. ie w1=65535, then -w1 = 1. w1 = -1234 is also accepted. Can't find this in the docs, and in fact I think I saw somewhere that it was not allowed?
  19. A

    Maximum Number of Variables for SERIN, and PE line breaks?

    I need to receive a string of ASCII data from a GPS using serin in the format: What is the maximum number of variables that can be specified in one statement? And how do I break the line up into multiple lines in the Editor. I don't see a 'line continuation' character
  20. A

    Runtime Error '6'

    I simulate the following simple test: When I go to the MEMORY window, select SFR I get "Run-time error '6': Overflow" IF the 'HEX' box is checked. Clicking on 'OK' closes PE. If HEX is not checked, the data is displayed - but clicking it gives the error.
Top