Search results

  1. H

    How to reset the timer (20X2)

    inglewoodpete. Thank you for the suggestions. We are going off topic here but my code spends its time circling around checking the time and looking for true switch closures, otherwise it does precious little except occasionally closing relays. Not using interrupts, in this case, keeps my code...
  2. H

    How to reset the timer (20X2)

    inglewoodpete thank you for your example. In my case I am running what is effectively a state machine with multiple "timer" intervals running in parallel. Using interrupts would, I feel, add to the complexity of the code and make it difficult to see the underlying logic. This state machine runs...
  3. H

    How to reset the timer (20X2)

    Alan thank you. By investigating using a combination of "Real" and Simulated I reached the same conclusion. I don't know how to look directly at the contents of the internal (minor tick) register but I agree that it seems necessary to use SETTIMER OFF before reissuing the SETTIMER statement...
  4. H

    How to reset the timer (20X2)

    So, back to the original intent of the question. :) How to reset the timer, it's not clear (to me) from the documentation how best to ensure this.
  5. H

    How to reset the timer (20X2)

    My code is part of a controller for a remote shutter. It's not practical for me to use a sertxd statement for debugging as there is no serial io access at that location. The picaxe is plugged into a cinch type socket so I can easily remove it and bring it back to my desktop for program loading...
  6. H

    How to reset the timer (20X2)

    In my program I want to reset the timer to prevent it overflowing. I do this whenever all actions that are dependent on the timer are complete but I don't think the methods I am using to reset it are working. timer = 0 . Does this reset the timer? settimer 34286 . I assume that...
  7. H

    hi2clast and hi2cflag, when are they valid

    Just trying to get a better understanding of when these two values become valid. I have a 20x2 as slave and a Raspberry Pi as master (using Python and SMBUS). To my mind the Picaxe Manual is a little vague about these two flags. To clarify: When I write sequential bytes onto the slave hi2cflag...
  8. H

    Touch command 14M2

    Going crazy here because I am missing something simple. Have a copper pad on the back of a panel wired onto bin b.3 and when I use the touch command it always returns 0. As does Touch16. Same pin with a ReadADC command returns a value. The pin is connected, not shorted, and I have tried a...
  9. H

    Does i2c slave data exchange conflict with readtemp?

    I think i2c slave mode data exchange on a 20x2 conflicts with readtemp. Does anyone know is that correct? My 20x2 program regularly does a readtemp. Asynchronously it may also receive a message from an i2c master and sometimes the i2c message is reported by the master as 'failed'. This failure...
  10. H

    Arduino writing into Picaxe i2c Slave

    Would appreciate guidance from anyone who has code to write from an Arduino into a Picaxe 20x2 slave scratchpad memory. Specifically I want to write a byte of data into Slave address 0. Using the Arduino Wire library I cannot see how the target address is specified. Must be missing something...
  11. H

    i2c details - help

    I thought I had picaxe - picaxe i2c cracked but now I am not so sure and could do with some guidance setting up a reliable link. I am using two 20x2, one master, one slave with 4.7k current drive. Both on a pin-board within 4 cm of each other. 1. Is there a relationship/dependancy between the...
  12. H

    i2c flow control

    Has anyone seen any simple flow control techniques for i2C? I have a picaxe 20x2 acting as an i2c LCD. The 20x2 is in slave mode and simply receives and passes on to the LCD command and text streams sent by the i2cMaster, but it takes the Slave and LCD a little while to execute the display...
  13. H

    Relative memory speed (20x2)

    Trying to get my head around where best to locate IO storage buffers and tables for a 20x2 application. At present I am reading from one device (SERIN) into scratchpad, processing data and then placing it into RAM for output (SEROUT) to another device. I think that RAM and Flash are different...
  14. H

    20x2 syntax error

    Anyone know why this code generates an error report or how I should bypass. I have submitted an error report and note that something similar was submitted back in 2009. #picaxe 20x2 if b0 bit 0 clear then 'new switch depression made ' setbit b0 , 0 'set flag ' setbit b0, 7 'indicate...
  15. H

    Exit from Button

    I am using the Button command on a 14M2, (pin c.3) inside an independent task. The effect being sought is to wait until a switch has been pressed for a few seconds and thereafter increment a delay value for each couple of seconds it remains depressed. This can be done using the Delay and Rate...
  16. H

    Daisy Chain Ripple Programming

    No problem, that's language for you. Just grateful for any input especially if it also helps others. As I said the design will just get by without a program load capability but it is going to be a pain to fix if I need to change installed items. The circuit has no pc connection as it is self...
  17. H

    Daisy Chain Ripple Programming

    Has anyone tried downloading one picaxe through another? I have a string of picaxes linked one to another through serial links daisy chained across an open space. It is tiresome to take each out in order to optimise my program. Each has the same program. The plan would be to ripple load a...
  18. H

    Axepad on Ubuntu 12.04

    I can program my Picaxe's from an old laptop loaded up with Windows XP but I cannot do the same from my Ubuntu Linux workstation. I prefer using Ubuntu because that workstation is also used for Arduino stuff and I want to use both types of controller together. What I get is a hardware not found...
  19. H

    Fixed amplitude PWM 14M2

    I assumed that by putting an output into PWM mode the voltage level on the pin would remain a constant when I varied the duty cycle. However I see the amplitude varying, which I think is not what is generally needed for modulating a LED. It could easily be my rubbish scope setup but it is not...
Top