Search results

  1. D

    Preprocessor directives, colons, curly brackets & comments

    I've just discovered a strange oddity - I can't seem to use the colon (:) to merge multiple lines of code into one, curly brackets to "group" pieces of code in the editor, or use comments on the same line when using preprocessor directives. The following doesn't work: #IF number > 1: put...
  2. D

    PICAXE programming header board

    Afternoon folks, Slightly odd question, but is there a product already on the market which makes the PICAXE programming cable breadboard friendly? Been meaning to roll a PCB myself for ages now, simply just the 3.5mm jack, 10/22k resistors, and three female connectors for jumper wires - much...
  3. D

    "Calibrating" LDR using a separate "ambient" LDR

    Afternoon folks, I'm looking to use LDRs to detect the presence of trains on a model railway - the LDRs would be mounted between the rails, reacting to the shadows cast by the trains as they roll over. As the layout being built is going to be travelling to various exhibitions, likely with...
  4. D

    Polarity Detection

    Hey guys, Is there a way to detect polarity? I'm designing a custom DCC function decoder (yes, WestAust...), which is going perfectly fine... except now I've realised I might wanna see if I can make it work on DC too. A little basic background - DCC is a communication protocol for model...
  5. D

    Using 2-lead bi-colour LEDs with PICAXE

    Morning folks, Is there an easy way to use a large number of 2-lead bi-colour LEDs with a PICAXE chip? I'm needing to drive approx. 100 of them, each individually switchable - not just between colours, but fully off too. Up until now I was using 3-lead LEDs with an HT1632C driver, but I've...
  6. D

    Programming best practice - decision based on many input variables

    Afternoon folks, bit of a different conundrum today... I'm trying to work out the best / easiest / most efficient way to build a "condition list" in PBasic... My use-case is interlocking for a model railway, with the sequence of events happening as follows: "requested" command received (eg...
  7. D

    HT1632C Train Describers code

    Good afternoon folks, This is a project I'm currently building to use six 8x8 matrices controlled by a HT1632C, representing two Train Describers as seen in signalboxes on the railway. Each train describer is one half of the "full" display, at 8x24 each. In addition, the chip can also use the...
  8. D

    i2c EEPROM addressing

    Hey guys, I'm wanting to use a 4Kbit i2c EEPROM for storage of ASCII art data. Looking at the datasheet (mine is the M24C04 version), the memory addressing seems to work on a 9-bit system, where the LSB of the 7-bit address forms the MSB of the memory address. I'm just wondering about how to...
  9. D

    ASCII character set used by PE6

    Afternoon folks, Bit of an odd one, but which ASCII character set is used by PE6? As far as I'm aware, the "standard" 0-127 ASCII characters have never changed, but I seem to be finding conflicting information with regards to the "extended" character set... is it the same character set used in...
  10. D

    Capability question - reading an RS485 bus while pushing results to PC

    Afternoon ladies and gentlefolks, I'm wanting to do some testing on an RS485 bus which should (I believe) be compatible with PICAXE - specs follow: 9600 baud 8 data bits no parity 2 stop bits This is implemented by a proprietary piece of equipment I have, namely the NCE model railway DCC...
  11. D

    Using Octal in PE6

    Morning folks, Just a very quick question - does the PICAXE Editor support the Octal numbering system? Just personal preference, given that it's base-8... useful for an 8-bit microcontroller... Just can't find reference to it in the documentation Cheers!
  12. D

    PICAXE PreProcessor crash

    Afternoon folks, I'm trying to check the syntax on what I would call a reasonably simple program - quite literally all it does is load a set of data into the table memory of a 20M2. However, when I hit Check Syntax, Windows throws up an error, saying PICAXE PreProcessor has stopped working...
  13. D

    Random command strange results

    Hey folks, I'm trying to write a program to randomnly flash 16 LEDs one at a time, each time using one of 4 random colours with a random delay between each flash. The idea is to simulate shell flashes behind a model of a WWI trench. The 4 colours are achieved by 12 potentiometers in groups of 3...
  14. D

    Editing keyboard shortcuts

    Morning folks, Is there a way to edit keyboard shortcut bindings? I'm specifically wanting to swap F8 and Cntrl + Space so I can step through a program like in Visual Studio (just personal preference)
  15. D

    Understanding i2c addressing syntax

    Afternoon (again) ladies and gentlefolks, Hopefully a quick question with regards to the syntax of the hi2csetup, hi2cout and hi2cin commands, specifically addressing. My bus is going to have multiple slave devices for various different things. It seems that you have to set a slave address in...
  16. D

    Multiplexing using a 40X2

    Hey guys, I'm looking to multiplex a 14x14 LED matrix using a 40X2, and was just wondering if you guys could confirm a couple of things. Firstly, I'm guessing this would make some sense - if I scan the rows, then the columns which are to be activated could be stored in variables, with a...
  17. D

    Interfacing with a DCC decoder

    Good afternoon all, I'm wondering if it's possible to interface with a DCC decoder easily? The problem is the way these decoders work - they use low-side (NPN) switching, with a common positive and separate negative "outputs". Is there a way for a PICAXE to detect that one of these lines has...
  18. D

    SMD Package Sizes

    Evening all, I've looked through the forum and can't find a solution for this, so here goes: I'm looking to use the 40X2 and 20X2 in a project with limited space, so I've gone for the surface mount option. However, the PICAXE website only tells you that the SMD chips are 300mil / 7.62mm SOIC /...
  19. D

    Maths making use of variable overflow

    Happy Friday! I was wondering if someone on here would be able to confirm something for me: I'm planning on using a relatively simple method for having timed functions carried out by the picaxe, while still scanning pins etc. For example, when a pin is detected to be high, 2 minutes later the...
  20. D

    i2c read times

    Morning folks, A (hopefully) straightforward question regarding i2c - if I have a picaxe i2c system where the master and all slaves are picaxe chips, what's the approximate time taken for the master to read one byte of data from a slave? I'm planning on having multiple input devices connected...