Recent content by InvaderZim

  1. I

    Grrr...pin syntax

    This one tripped me up: #picaxe 18M2 main: bit0=C.5 pause 1 b1=C.5 pause 1 bit0=pinC.5 pause 1 b1=pinC.5 pause 1 readadc C.1,b2 pause 1 'readadc pinC.1,b2 'bad syntax goto main When you simulate the above code, the values of bit0 and b1 will change depending on what assign statement is being...
  2. I

    Adjusting Vref+ on 18M2

    Hi all, quick one about ADC math: When using the 5V power supply, I'd thought a readadc10 value could be converted to voltage by the equation: volts = 5*value/1023 where 'value' is the ADC reading, a number from 0-1023. Therefore, the highest value read would be 5*1023/1023 = 5.000V, assuming...
  3. I

    Microsoft Serial Ballpoint Driver Installed

    This might be a fluke, but it was weird enough to post. I'm running Win Vista64 and editor v5.3.1. I was debugging while running the editor (with the 8MHz option). My code wasn't using the serial port, just sampling an ADC, averaging, and then debugging. I'm using the RevEd USB serial thingy...
  4. I

    Interrupts and subroutines: keeping things tidy

    Hi all, I'm familiar with basic interrupt operation. Here's my situation: I've got subroutines that are called both in the main code and also in the interrupt code. Things are complicated enough that I decided to have a policy of preventing the subroutines from being interrupted. That prevents...
  5. I

    For the hardware folks - FET driving for BLDC motor

    Hi all, this is only vaguely related to a PICAXE. But I'd like to have a logic circuit drive a brushless dc (BLDC) motor, which means having FETs on 24VDC switching on and off, but with logic at a different voltage. This means level translation, which I've got no experience with. Would the...
  6. I

    Infrain2

    Looking at the manual, it says that infrain is for input0 only, and infrain2 is for input3 only (which isn't on an 18x). Is that a typo? I'm starting on a new project, but don't have all the hardware yet; I'd like to keep writing code in the meantime though! Thanks!
  7. I

    Screw Terminals

    Random question: I'm going to get a CHI035 power board. I wanted some screw terminal blocks to solder on there. I'm looking at these but was worried that the studs would be too fat for the holes in the board. The drill drawing suggests 1.3mm holes, and that's either just right or just a little...
  8. I

    SelmaDAQ

    I thought I'd play around with the Selmawares. I'm not sure what I should be sending though; I can successfully send text to a terminal program, and when I 'connect' with SelmaDAQ it looks successful, with the 'R' (receive) light blinking 6 times, pausing, etc., just as my test program should...
  9. I

    Quick Question: Servos

    Hi all, Can an 18x (or any picaxe for that matter) support more than 1 servo at a time? Can all 8 outputs be servos if I choose? And just curious: do all 8 pulses happen at the same time? Or one after another? That probably doesn't matter for my purposes, just got to thinking. Thanks!
  10. I

    Supply undervoltage interrupting pauses?

    Hi all, I'm just looking for a sanity check here. I've had an annoying bug, and I think it was due to me being silly about the supply voltage; but I thought I'd share this ghosst story on this fine Halloween 1) to make sure I understand my problem and 2) to warn others. I used 7.5 volts as the...
  11. I

    If-elseif-else statements - What's wrong?

    If statements don't behave quite like I'd expect in the simulator; is this a feature or a bug? Or a stupid user error? :) In the following code, 2 inputs are decoded into 1 of 4 states; if there is a problem with decoding, then '99' is returned. The simulator decodes a state, skips the other...
Top