Recent content by Flenser

  1. F

    How to use serial commands for chip-chip communication?

    You can get garbage from serin if the baudmode constant specifies the wrong clock speed for either the tx or rx chip but this is just a guess. I can't tell if this might be the cause of you problems from the short code snippets that you have posted. You will need to post your full code for the...
  2. F

    Pushbutton ON/OFF

    Edmunds, Based on your description it sounds something like this: setup hardware interrupt sleep_label: sleep 0 <init code> do <main code> <code to detect how long the button is pressed> if button pressed > 3 sec then button_press = true endif loop untl button_press = true goto...
  3. F

    Hardware not found!

    If you are seeing a signal on the serin line than I think that demonstrates that the COM port is working and any other checks that you do for the COM port will only be successful. If the loopback test did not work then that points to a problem in the serout line to the PC, as Hippy pointed out...
  4. F

    Hardware not found!

    There are some circumstances where the code you are running on the chip can prevent the download. Under these circumstances there is nothing wrong with your wiring or your download circuit but a "hard reset" is required to give the PICAXE firmware a chance to delect the start of the download...
  5. F

    interrupts in simulation mode don't seem to be working

    rmitch, Interrupts do work in simulation, I've recently used them, but your program will run much slower in simulation than on the chip. To see an interrupt do something in simulation you will need to change your code to make the interrupt run more often. On the 20X2 I set the simulation delay...
  6. F

    Program a PicAxe with PicAxe

    Mort, You said Are you aware that this is the way that PE already works? Checkout the description of the EEPROM command. As Hippy has already said, you are limited to using the PICAXE programming software, PE, AXEpad, etc to program a PICAXE chip, so you will not be able to program one...
  7. F

    Setting an interrupt on the timer 0 overflow appears to cause a hardware interrupt at 8x the timer interrupt frequency

    Hippy, I am able to reconcile the values I get from the timer registers using PEEKSFR with both the PIC timer interrupt behaviour I observe and the model in your post #5 I do a PEEKSFR of the TxCON registers with a 1sec PICAXE timer interrupt set using this code: SETTIMER t1s_4 timer=65535...
  8. F

    Setting an interrupt on the timer 0 overflow appears to cause a hardware interrupt at 8x the timer interrupt frequency

    Hippy, Thanks for the suggestions. I have a workaorund that will allow my PICAXE version of this scheduler to largely work as described for the original: ; Setup timer0 to overflow for the scheduler tick SETTIMER t1ms_4 timer=65535 ; Set a polled interrupt on the timer0 overflow SETINTFLAGS...
  9. F

    Setting an interrupt on the timer 0 overflow appears to cause a hardware interrupt at 8x the timer interrupt frequency

    Hippy, The resuls of this test: #NO_DATA #NO_TABLE #PICAXE 20X2 #TERMINAL 4800 SETFREQ M4 SETTIMER t1s_4 SYMBOL TMR1L = $CE ; FCEh SYMBOL TMR1H = $CF ; FCFh Main: ;pause 1000 PEEKSFR TMR1L, b0 ; must read TMR0L before TMR0H PEEKSFR TMR1H, b1 ; must...
  10. F

    Setting an interrupt on the timer 0 overflow appears to cause a hardware interrupt at 8x the timer interrupt frequency

    Hippy, Your suggestions are a good pickup. I'm going to do some peeksfr'ing to see what I can discover about the underlying configuration of the PIC timer. It later occurred to me that the PICAXE firmware likely will need to setup a PIC hardware timer interrupt in order for the DOZE 1, 2, etc...
  11. F

    Setting an interrupt on the timer 0 overflow appears to cause a hardware interrupt at 8x the timer interrupt frequency

    I am attempting to implement a cooperative task scheduler, as described in the book Patterns for time-triggered embedded systems by Michael J. Pont, on the X2 chips and for this I need: 1) to be able to put the chip to sleep, and 2) a timer interrupt that will wake the chip from sleep and that...
  12. F

    Need help identifying two 20 pin Picaxes

    You can also connect them to PE and do a firmware check, which will tell you the type of chip connected and the firmware revision.
  13. F

    Simulation Bug?: Timer interrupt does not wake 20X2 simulation from the "DOZE 0" command.

    AlleyCat, I did not make my post clear enough. I was not after a workaround. The simulator does correctly simulates the "doze 0" command. The simulator does correctly simulate the timer interrupt. The simulator does correctly simulate a pin change interrupt waking the program from "doze 0"...
  14. F

    Simulation Bug?: Timer interrupt does not wake 20X2 simulation from the "DOZE 0" command.

    I've just been using the X2 timer interrupt for the first time and struck this behaviour in simulation. I'm using PE v6.1.0.0 The simulation is run with a delay of 30ms because this allows you to see the line of code that is being executed. The timer settings are set so that the timer interrupt...
  15. F

    Use of RFID RC522

    Sam, A search of the picaxe forurm for RC522 does not come up with anyone who has written code for this chip, so that will make it much more difficult. Can you give us a link to the module that you have? A look at the datasheet might enable the forum to help you read data from this module.
Top