Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

JuneBug SIRC RX - Complete

Status
Not open for further replies.
Thanks Bill

Ok, I have everything setup as your workspace, including the watch Commandcode and DeviceCode.

I have LED1 lit, send a SIRC IR and LED2 illuminates.

No values in either command or device......??
 
I forgot you have to pause/stop the debugger for the watch window to update. A breakpoint near the very end of the program will work.
find this line (forth from the end)
btfsc PORTB, RB2
and set a breakpoint (double click)
 
ok, got the breakpoint set

maybe my remote is not sirc 12**broken link removed**
 
Last edited:
I'll have to try an extended remote and see what happens. Here's my copy just to be sure it's the same.
 

Attachments

  • Sony SIRC.asm
    3.9 KB · Views: 174
I tried a re-program of the PIC and this is what I am getting for error:

Programming Target (2/1/2008 11:44:04 PM)
Erasing Target
Programming Program Memory (0x0 - 0x1FFF)
Verifying Program Memory (0x0 - 0x1FFF)
Programming EEPROM Memory (0x0 - 0xFF)
Verifying EEPROM Memory (0x0 - 0xFF)
Programming User ID Memory
Verifying User ID Memory
Programming Configuration Memory
Verifying Configuration Memory
PK2Error0027: Failed verify (Address = 0x30000C - Expected Value 0x0 - Value Read 0x3)
PICkit 2 Ready
 
ex-navy said:
Am I correct in assuming iaw a debugger that I select debugger>select tool>MPLAB SIM
No. Not if you expect anything to happen on the Junebug board. MPLAB Sim means the program runs in the simulator, not on the chip. Choose PICkit2 to debug on the chip.

For it to debug on the chip, you have to build (assemble) the program in Debug mode and program it to the chip from the Debugger menu. That way it programs the debug code as well as the program.

After you do that you can do all the nice debug things with the actual code on the chip, like watch variables, start and stop the program at will, set breakpoints, single step, etc..

You can do all the same things in the sim, but you won't get data from stuff on the target board, like the IR, because the target board is not running. Good for some things, but useless for what you're trying to do. :)
 
Last edited:
blueroomelectronics said:
I'll have to try an extended remote and see what happens. Here's my copy just to be sure it's the same.

The extension is added on the end of the earlier standard, so the 12 bit code will happily receive the later extended codes (or at least mine does).
 
Hi guys,

I originally thought "to run in debug mode" meant selecting debugger>Select tool>MPLAB SIM.

I now understand that this is just a software simulator and not the actual
PIC outputs.

Being a newbie to all of this, I think that I might tend to rush and not read
everything.

Can I assume these points are correct:

MPLAB 8.0 Project wizard, select device, select MPASM toolsuite and the 3 files associated.

Create project file and save it.

Skip the linker file in this case as the SONY SIRC code it's not relocatable code.

Click finish.

Workspace, add SONY SIRC.asm to source code.

Plug Junebug into USB, select Programmer as Pickit2

Response from Pickit2 is READY

Double click on SONY SIRC.asm

Set breakpoint at btfsc PORTB, RB2

Build all

Program the 18f1320 by selecting Programmer>Program

Pickit2 output verifies target was programmed.

Turn off 3 Tutor dip switches on Junebug

LED1 on Junebug lights to reflect that Junebug is ready to receive SIRC.

View>watch>add symbol Commandcode & Devicecode

Point remote at Junebug, select button, LED2 illuminates to show valid code
received.

No value shown in Commandcode or Devicecode


I bet you I am missing something very easy being new to PIC programming.

A thumbnail is attached (workspace)

**broken link removed**

Thanks
 
Last edited:
I can tell by the screen shot your in program mode not debug.
I've created this crude video, Debug in 60seconds :)
**broken link removed**
 
Plug Junebug into USB, select Programmer as Pickit2
Right there you went wrong. Don't select a programmer at all. Instead, select a debugger. You can't have both at the same time (except with the sim). After selecting your debugger you will program the chip from the Debugger menu instead of the Programmer menu.
 
blueroomelectronics said:
Hey futz, what do you think of the debug video? does it work on your PC?
90% of my machines are Linux. My main machine (the one I'm on now) is Linux. Much prefer it over Windoze. My programming machine is dual boot with Windows first, as all the tools are Windows, and Wine won't do everything.

Anyway, on this Linux machine, when I go to get your SWF file to play it starts, downloads the first little bit (and will play it fine) and then the download stalls every time. Can't seem to get it to download the rest. I think it might be your server, but can't be sure. Should try it on a Windoze box but I have to go to work very soon here. I'll try it later today on Windoze.

What I did do to make the movie larger was to **broken link removed**.

EDIT: By "pounding away" at it - reloading the page over and over - I finally got it all downloaded. And it plays fine. :D It's your server, I think. Maybe they're serving swf's at low priority or something?

EDIT2: Tried it on a windoze box and it's the same deal. Your server sends about the first 5% and then stalls. I got disgusted with waiting, tried the one on my server and it just downloaded right through. No delays at all. I'm a very happy Site5 customer.
 
Last edited:
blueroomelectronics said:
I've created this crude video, Debug in 60seconds :)
**broken link removed**
Yup, that explains it. A spoken audio track wouldn't hurt, but not necessary. That first zoom shouldn't last so long. Should zoom out some before the build so you can see the window on the right properly.
 
Last edited:
blueroomelectronics said:
Hmm, I'm heading out today. I'll try it from a friends house. Maybe move it to a hosting service.
I have oodles of space and unused traffic capacity. I'm kind of a hosting reseller, but with no customers but myself and one other guy. :D Hey, it was the same price as my previous hosting place that only had capacity for a single site! I can host it for ya. But of course I can't put it up right now. Later today.
 
Thanks futz, PS futz would you like to work on the Ladybug with me. I could use a second opinion.
 

Attachments

  • Ladybug early.zip
    78.1 KB · Views: 127
Bill,

First of all, thank you for the FIRST CLASS help!!!

As a newbie, the movie clip is worth more than a 1,000 words. Awesome idea.

Very creative thinking!

As a consumer, one of my further purchase descisions for the Firely, Dragonfly, (already bought the Unicorn) would be based on this excellent video training demonstration.

I think that anyone who is thinking of buying a PIC tutorial/programmer should look at how you present the user information to them as an important factor.

You have helped me immensely!

Thank you very much
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top