<< return to Pixycam.com

PIXY CMUcam5 and PICAXE 28X2 module ...

Hi,

I setup a basic serial in/out loop but I don’t see any data ??? The Serial IN/OUT pins of the 28X2 are jumpered to the gray cable from the PIXY CMUcam5

28X2 to PIXY
2 to 1
1 to 4

I have the PIXY CMUcam5 I/F setup for SPI with SS at 9600 8N1 Baud

Got any clues why I can’t data from the PIXY CMUcam5?

#picaxe 28X2 ; type chip used
#terminal 9600

; Serial IN = PIN 2 of 28X2 module
; SerialOUT = PIN 1 of 28X2 module

Do
;----------------------------------------Sig#----XPos—YPos------Width------Height===========The data Bytes I want to retrieve
SerIN 0,T9600_8,b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17

SerTXD ("PIXY say’s; ",b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17)

pause 10
Loop

IF I comment out the SerIN command all I ever see on the terminal window is "PIXY say’s; " over and over … otherwise I do not seem to be receiving any info from the PIXY CMUcam5 and SerTXD doesn’t send anything back to the #Terminal window ???

I want to make a new toy!

Hello Walt,
Here are some things to check:

  1. MOSI on Pixy is connected to MOSI on your platform
  2. MISO on Pixy is connected to MISO on your platform
  3. SCK on Pixy is connected to SCK on your platform
  4. SS on Pixy is connected to SS on your platform
  5. Your platform is driving SCK (master)
  6. SS is active LOW during receive/transmit
  7. SS must toggle HIGH between bytes
  8. If you are running PixyMon, make sure your Pixy is in default mode (not raw or cooked) otherwise it won’t send data through the SPI port

Hope this helps!

Edward

Hi,

The PICAXE 28X2 module does not have MOSI or MISO … with what I have below here what is the best way to receive data from the PIXY CMUcam5?

See the attached image of the PIXAXE 28X2 module.

Hi,

I moved the serialIN from 28X2 module PIN 2 to PIN 8 (c.3) a progressive step forward in the BASIC language program. I also switched the PIXY CMUcam5 to UART mode but still it’s not working as expected ???

Do
; Sync ChkSum SigNum X Y Width Height
;SerIN 2,T9600_8,b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17
SerIN C.3,T9600_8,w1
pause 25

SerTXD ("PIXY say’s; ",b1, b2, b3, b4, b5, b6, b7, b8, b9, b10, b11, b12, b13, b14, b15, b16, b17, cr, lf)
pause 1000

Loop

Hi,

Finally got a working solution!

#Picaxe 28X2
#Terminal 9600

Symbol RX_PIN = C.3
Symbol RX_BAUD = T9600

Do
SerIn RX_PIN, RX_BAUD, ($AA), b1, b3,b2, b5,b4, b7,b6, b9,b8, b11,b10, b13,b12
Select Case b1
Case $55 : SerTxd( “Normal”)
Case $56 : SerTxd( “Color”)
Else : SerTxd( “Unknown”)
End Select
SerTxd( " Checksum=" , #w1 )
SerTxd( " Signature=" , #w2 )
SerTxd( " X=" , #w3 )
SerTxd( " Y=" , #w4 )
SerTxd( " Width=" , #w5 )
SerTxd( " Height=" , #w6 )
SerTxd( CR, LF )
Loop

This works.

Hello Walt,
My apologies, I see now that you wanted to use UART communication (instead of SPI). Glad you got it working :slight_smile:

Edward