Shop OBEX P1 Docs P2 Docs Learn Events
Question about Debug — Parallax Forums

Question about Debug

The debug line displays:

Pins :

I cant figure out why the variable values aren't displayed. I have also tried using the parameter variables as well. I have a few other debug statements in this object that I am working on that do the same thing.

PUB start(dpin, cspin, clkpin, numDevs) | i

  SPI_MOSI := dpin
  SPI_CLK := clkpin
  SPI_CS := cspin

  debug("Pins : ", SPI_MOSI," ",SPI_CLK," ",SPI_CS)

  if (numDevs <= 0 || numDevs > 8 )
    numDevs := 8

  maxDevices := numDevs

  pinl(SPI_MOSI)
  pinl(SPI_CLK)
  pinh(SPI_CS)

  bytefill(@status, $00, 64)

  repeat i from 0 to maxdevices - 1
    spiTransfer(i,OP_DISPLAYTEST,0)
    setScanLimit(i,7)
    spiTransfer(i,OP_DECODEMODE,0)
    clearDisplay(i)
    shutdown(i,true)
    i++

Comments

  • cgraceycgracey Posts: 14,133

    You need to tell it how you want the value displayed:

    debug("Pins : ", udec (SPI_MOSI, SPI_CLK, SPI_CS))

Sign In or Register to comment.