USBIRToy not working in SUMP mode

USB infrared remote control receiver/transmitter. Get one for $20, including worldwide shipping.

USBIRToy not working in SUMP mode

Postby osbock » Fri May 10, 2013 9:26 am

Hi, I could swear that this was working before, but I'm having problems now.
I upgraded the firmware to v.22, and I'm using ols 0.9.6.1 (also tried 0.9.5)

For a sample source, I've tried an air conditioner remote, and tv-b-gone.

It appears to capture (led blinks in time with the tv-b-gone) but the graphed signal is all low.
any clues?

Addendum: I tested it in Winlirc and it works fine there. including irgraph, and rawir.
Also went back one more ols version to 0.9.4 and no good there either (flatline!)
osbock
Newbie
Newbie
 
Posts: 20
Joined: Tue Nov 01, 2011 7:52 pm

Re: USBIRToy not working in SUMP mode

Postby JTR » Fri May 10, 2013 8:26 pm

Clipboard01.jpg


Works a treat when Jawi's OLS is set up correctly. It seems so many details are lost in cyberspace.

Try this IR TOY plugin with OLS client 0.9.6b4 or higher with the default "as is" IR TOY firmware V22.

# Filename ols.profile-irtoy.cfg
# This is the suggested correct cfg file for the IR TOY Firmware V22
# By JTR

# Configuration for the USB Infrared Toy
# http://dangerousprototypes.com/docs/USB ... lyzer_mode

# The short (single word) type of the device described in this profile
device.type = IRtoy
# A longer description of the device
device.description = USB Infrared Toy OLS mode
# The device interface, SERIAL only
device.interface = SERIAL
# The device's native clockspeed, in Hertz.
device.clockspeed = 4800000
# Whether or not double-data-rate is supported by the device (also known as the "demux"-mode).
device.supports_ddr = false
# Supported sample rates in Hertz, separated by comma's
device.samplerates = 10000
# What capture clocks are supported
device.captureclock = INTERNAL
# The supported capture sizes, in bytes
device.capturesizes = 4096
# Whether or not the noise filter is supported
device.feature.noisefilter = false
# Whether or not Run-Length encoding is supported
device.feature.rle = false
# Whether or not a testing mode is supported
device.feature.testmode = false
# Whether or not triggers are supported
device.feature.triggers = false
# The number of trigger stages
device.trigger.stages = 0
# Whether or not "complex" triggers are supported
device.trigger.complex = false

# The total number of channels usable for capturing
device.channel.count = 8
# The number of channels groups, together with the channel count determines the channels per group
device.channel.groups = 1
# Whether the capture size is limited by the enabled channel groups
device.capturesize.bound = false
# Which numbering does the device support
device.channel.numberingschemes = DEFAULT

# Is a delay after opening the port and device detection needed? (0 = no delay, >0 = delay in milliseconds)
device.open.portdelay = 500
# The receive timeout for the device (in milliseconds, 100 = default, <=0 = no timeout)
device.receive.timeout = 1000
# Does the device need a high or low DTR-line to operate correctly? (high = true, low = false)
device.open.portdtr = false
# Which metadata keys correspond to this device profile? Value is a comma-separated list of (double quoted) names...
device.metadata.keys = "IRTOY"

# In which order are samples sent back from the device? false = last sample first, true = first sample first
device.samples.reverseOrder = true

###EOF###
JTR
Sr. Member
Sr. Member
 
Posts: 335
Joined: Mon Jan 31, 2011 5:50 am

Re: USBIRToy not working in SUMP mode

Postby osbock » Sat May 11, 2013 8:20 am

I believe that is the same setup I have (included in the latest version of ols) (I did a diff)
osbock
Newbie
Newbie
 
Posts: 20
Joined: Tue Nov 01, 2011 7:52 pm

Re: USBIRToy not working in SUMP mode

Postby JTR » Sat May 11, 2013 11:13 am

I just downloaded the latest OLS (client 0.9.6.1) and clearly the IR TOY profile included in the plugin directory is not the same as the one I posted and it is not correct.
JTR
Sr. Member
Sr. Member
 
Posts: 335
Joined: Mon Jan 31, 2011 5:50 am

Re: USBIRToy not working in SUMP mode

Postby osbock » Sat May 11, 2013 1:42 pm

JTR, Dude! I apologize for doubting! Worked like a charm. Someone should tell the OLS people...
Thank you very much!
osbock
Newbie
Newbie
 
Posts: 20
Joined: Tue Nov 01, 2011 7:52 pm

Re: USBIRToy not working in SUMP mode

Postby JTR » Sat May 11, 2013 3:44 pm

That is really great to here. The SUMP mode does show some interesting things that otherwise remain hidden and don't be afraid to play around with the settings to get better resolution and more samples. You can add some new defines to the prj_usb_config.h and SUMP.h file and tinker a bit if there is something that breaks the compile or just ask me.

32K samples at 150KHz sample rate is a lot more fun that 4K samples at 10K sample rate.

In prj_usb_config.h add this:

//====================================
// SUMP mode defines, choose ONE only
//====================================

// NOTE! Whatever settings are selected here must also be selected manually in the OLS client
// Currently there is no automatic matching.

//#define SUMP10K // 10kHz SUMP mode
#define SUMP100K // 100kHz SUMP mode
//#define SUMP125K // 125kHz SUMP mode
//#define SUMP150K // 150kHz SUMP mode MAX recommended until further testing.
//#define SUMP200K // 200kHz SUMP mode Firmware 22A only (Fast double buffer)
//#define SUMP240K // 240kHz SUMP mode Firmware 23A only (Insane quad buffering)

#define SUMP_SAMPLE_PKT_CNT 0x100 //( * 64 byte packets) 0 = 65536 (MAX)


In SUMP.h add this:

//============================================
// See prj_usb_config.h for user mode defines.
//============================================

//SUMP sample period with TIMER2
#if defined SUMP10K
#define T2_RXsampleperiod() PR2 = 149; T2CON = PRE_x4 + POST_x2 //10kHz 12M / 15 / 4 / 2 Note that PR2 needs to one less than calulated value
#elif defined SUMP100K
#define T2_RXsampleperiod() PR2 = 119; T2CON = 0 //100kHz 12M / 120 Note that PR2 needs to one less than calulated value
#elif defined SUMP120K
#define T2_RXsampleperiod() PR2 = 99; T2CON = 0 //120kHz 12M / 100 Note that PR2 needs to one less than calulated value
#elif defined SUMP125K
#define T2_RXsampleperiod() PR2 = 11; T2CON = PRE_x4 + POST_x2 //125kHz 12M / 12 / 4 / 2 Note that PR2 needs to one less than calulated value
#elif defined SUMP150K
#define T2_RXsampleperiod() PR2 = 9; T2CON = PRE_x4 + POST_x2 //125kHz 12M / 12 / 4 / 2 Note that PR2 needs to one less than calulated value
#elif defined SUMP200K
#define T2_RXsampleperiod() PR2 = 59; T2CON = 0 //200kHz 12M / 60 Note that PR2 needs to one less than calulated value
#elif defined SUMP240K
#define T2_RXsampleperiod() PR2 = 49; T2CON = 0 //240kHz 12M / 50 Note that PR2 needs to one less than calulated value
#endif

//*************************************************************************************************

In the OLS client IR TOY plugin alter these lines to include the new options.

device.samplerates = 10000, 20000, 100000, 125000, 150000, 200000, 240000


device.capturesizes = 1024, 4096, 8192, 16384, 32768

BTW, the OLS people know about the new IR TOY SUMP mode. I cannot say why an updated CFG file was never included in the OLS client. Just one of those oversights I guess...
JTR
Sr. Member
Sr. Member
 
Posts: 335
Joined: Mon Jan 31, 2011 5:50 am

Re: USBIRToy not working in SUMP mode

Postby osbock » Tue Jun 25, 2013 9:06 pm

****EDIT*** Never mind. The product page only pointed to the compiler, and it looks like you need the IDE as well.
Downloaded and now opened the project. I'm having a little trouble finding prj_usb_config.h

Is this a microchip "system" file? because I can't seem to find it in the source bundle.

***original***
This is totally intriguing! I'm mostly an avr guy. Are there any pointers for setting up the compiler environment on windows?
I downloaded mplab, but don't see makefiles etc in the source bundle.

An alternative would be a hex file, though it's about time I dipped back into pic land. (I have a super old dev kit)
osbock
Newbie
Newbie
 
Posts: 20
Joined: Tue Nov 01, 2011 7:52 pm

Re: USBIRToy not working in SUMP mode

Postby JTR » Tue Jun 25, 2013 10:19 pm

Sorry! I was wrong. The "official" IR TOY firmware is two generations behind my own forked version and there is no prj_usb_config.h file associated with V22. You would make the above changes in HardwareProfile.h where "T2_RXsampleperiod" is defined.

Sorry about that...
JTR
Sr. Member
Sr. Member
 
Posts: 335
Joined: Mon Jan 31, 2011 5:50 am

Re: USBIRToy not working in SUMP mode

Postby osbock » Wed Jun 26, 2013 4:30 pm

I'm still having trouble getting it to compile in MPLAB-X It says it can't find the source files, even though they are listed in the project pane. Is there some particulary directory structure I need to reorganize them into?
osbock
Newbie
Newbie
 
Posts: 20
Joined: Tue Nov 01, 2011 7:52 pm


Return to USB Infrared Toy