Recent content by Flenser

  1. F

    Analogue input basic test is failing???

    OLDmarty, Some background info for you. The pic 18F45k22 chip only has one ADC module and when you read an ADC value on one of the pins there is an internal switch that connects the ADC module input to the pin you have specified. i.e. you can only read the ADC value on one pin at a time...
  2. F

    Using the TIME feature on a 14M2

    You can still use the nap command but you will need to measure time by counting your naps instead of using the time variable. This code has a delay of about 1s using the nap 6 command: #PICAXE 08M2 #no_data setfreq m4 #Terminal 4800 w0=0 Do nap 6 inc w0 SerTxd( #w0," " ) Loop and...
  3. F

    Using the TIME feature on a 14M2

    Firemanjim, In the description of your project you said: This assumption looks to be incorrect. The manual entry for the SLEEP command describes the microcontroller being put into a low power mode in which all the internal timers are switched off and also that the 'time' variable will not...
  4. F

    Displays for 2019

    Inglewoodpete, If the stock AXE033 serial at 2400 baud is a bit too slow for your project you can run serial at 9600 baud on the 18m2 chip: AXE133 code for 18M2 using hardware UART needs no delay between chars up to 9600 baud
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
Top