PDA

View Full Version : Renard start addressing



Adamseth77
03-29-2011, 03:13 AM
Ok, once again I have managed to confuse myself. I have read the wiki on this over and over again, but I'm obviously missing something. I've opened "Renard-20090915.asm" in "Windows Notebook" and changed the "start address". I then saved it several times in several different places. Next, I open up "MPASM" and browse for my "Renard-20090915.asm file" and it does not show up anywhere for me to use. I saved it several times and in different places hoping I would be able to find it once I was in "MPASM". So far, no such luck! Like I said earlier, I'm obviously doing something wrong. Do you have to re-write the entire program and save it as something other than an asm.txt file?

Totally confused,
Adam

RavingLunatic
03-29-2011, 06:57 AM
Did you accidently change the extension to .txt? That would explain why you are not seeing it when browsing from MPASM. Make sure the extension is still .asm.

Adamseth77
03-29-2011, 10:28 PM
Did you accidently change the extension to .txt? That would explain why you are not seeing it when browsing from MPASM. Make sure the extension is still .asm.


Ok, I managed to find the file I needed and tried to "Assemble" it. It finished with 1047 lines, 264 warnings, and 262 ERRORS!
Once again I am totally lost now. Has anyone done a tutorial video on programming start addresses?

HELP ME, I'm drowning!

Thanks in advance,
Adam

Adamseth77
03-29-2011, 10:36 PM
Did you accidently change the extension to .txt? That would explain why you are not seeing it when browsing from MPASM. Make sure the extension is still .asm.

Is there anything special you need to do to the file, or do you just save it from the wiki, open it in "Windows Notepad, make the change to the "Start Address", save it again, open "MPASM", browse for the file, and assemble it?

dpitts
03-29-2011, 10:55 PM
It has been my experience with Windows Notepad that it does change extension to .txt when you save.
And if you do not have show extensions selected in folder options you won't even know it has been changed.

Adamseth77
03-29-2011, 11:01 PM
It has been my experience with Windows Notepad that it does change extension to .txt when you save.
And if you do not have show extensions selected in folder options you won't even know it has been changed.

I think I got that part solved by doing just that and then also renaming the file without the .txt. on the end.
The problem I am having now is that once the file is assembled in MPASM, it is assembled with 262 errors.
Thanks for the tip though!
Adam

RavingLunatic
03-29-2011, 11:02 PM
Personally, I don't use the MPASM method. I use the MPLAB IDE method and I just verified that the wiki file doesn't have any issues via that method.

Adamseth77
03-29-2011, 11:11 PM
Personally, I don't use the MPASM method. I use the MPLAB IDE method and I just verified that the wiki file doesn't have any issues via that method.

Is there a how to on that method anywhere or could you give me a quick break down of the steps?

RavingLunatic
03-29-2011, 11:14 PM
I just tried the MPASM method and it didn't like the directory that I had the .asm file in. I moved it into the C:\ root directory and it worked fine from there. Apparently it didn't like the - in the directory name I had.

So try moving the .asm file to a simple location.

dpitts
03-29-2011, 11:16 PM
I agree MPasm does not like spaces in the path I was able to assemble file with Mpasm v5.39 without a problem.

RavingLunatic
03-29-2011, 11:23 PM
Is there a how to on that method anywhere or could you give me a quick break down of the steps?

Wayne J's videos (http://www.doityourselfchristmas.com/wiki/index.php?title=WayneJ%27s_video_series_on_PIC_pro gramming)will fill the bill nicely.

Adamseth77
03-30-2011, 02:29 AM
Alright, I managed to get one pic programmed with a "start address" of "0" and it seems to be working just fine taking only channels 1-16 on my first Renard ss16. I used the "MPLAB IDE" method. ( Thanks RavingLunatic ) I went back to my asm. file and changed the start address to "2" to handle channels 17-32 on my next Renard ss16 and did everything exactly the same as I did the first time. This time, when I try to "Build All" it keeps telling me "Build Failed"! Any ideas why I am
having so much trouble with this or what I may be doing wrong? ( My head is starting to get sore from banging it on the keyboard )
All your help with this is and will be greatly appriciated.

RavingLunatic
03-30-2011, 06:59 AM
I went back to my asm. file and changed the start address to "2" to handle channels 17-32 on my next Renard ss16 and did everything exactly the same as I did the first time. This time, when I try to "Build All" it keeps telling me "Build Failed"!
Any ideas why I am having so much trouble with this or what I may be doing wrong? ( My head is starting to get sore from banging it on the keyboard )

Hard to say what is the problem without seeing the errors being thrown. Any errors should be shown in the same window as the "Build Failed"! message. There are normally only 3 Warning[219] messages anything else should be telling you what is causing the error.

Adamseth77
03-30-2011, 01:05 PM
Hard to say what is the problem without seeing the errors being thrown. Any errors should be shown in the same window as the "Build Failed"! message. There are normally only 3 Warning[219] messages anything else should be telling you what is causing the error.
I will check tonight when I get home from work and then try to post the errors.
Thanks for helping me out with this!

ErnieHorning
03-30-2011, 02:03 PM
It has been my experience with Windows Notepad that it does change extension to .txt when you save.BTW, If you enclose the file name and extention with double quotes, it won't add the TXT to it.

dirknerkle
03-30-2011, 02:20 PM
If you set Windows file types to open ASM files with Notepad, it won't change the extension at all.

Skunberg
03-30-2011, 04:52 PM
Alright, I managed to get one pic programmed with a "start address" of "0" and it seems to be working just fine taking only channels 1-16 on my first Renard ss16. I used the "MPLAB IDE" method. ( Thanks RavingLunatic ) I went back to my asm. file and changed the start address to "2" to handle channels 17-32 on my next Renard ss16 and did everything exactly the same as I did the first time. This time, when I try to "Build All" it keeps telling me "Build Failed"! Any ideas why I am
having so much trouble with this or what I may be doing wrong? ( My head is starting to get sore from banging it on the keyboard )
All your help with this is and will be greatly appriciated.

I can't help you with this build stuff, but if I understand correctly you would use start address 0 for the second Renard in the chain. A Start address of 2 would cause the second Renard in the chain to use channels 33-48 (unless these are not chained by cable and your using RenW wireless).

Brian

Adamseth77
03-30-2011, 05:01 PM
If you set Windows file types to open ASM files with Notepad, it won't change the extension at all.

Do you suppose there is something wrong with the way the files are saved that is causing the "FAILED BUILD" errors in MPLAB?

Adamseth77
03-30-2011, 05:04 PM
I can't help you with this build stuff, but if I understand correctly you would use start address 0 for the second Renard in the chain. A Start address of 2 would cause the second Renard in the chain to use channels 33-48 (unless these are not chained by cable and your using RenW wireless).

Brian

I am trying to use ren-w's in a "Global Broadcast" with some renard ss16 controllers

Skunberg
03-30-2011, 05:42 PM
I am trying to use ren-w's in a "Global Broadcast" with some renard ss16 controllers

oops, never mind. Your on the right track, no matter how bumpy it is. Maybe pm Dirk and ask for the hex files if you get to the point of throwing the PC out the window.

Brian

RavingLunatic
03-30-2011, 07:53 PM
Time to take a step back and try again.

Build the good file again.
Edit the file inside the MPLAB IDE environment (no need to edit with an external program)
Try building again

Adamseth77
03-30-2011, 09:47 PM
Time to take a step back and try again.

Build the good file again.
Edit the file inside the MPLAB IDE environment (no need to edit with an external program)
Try building again

The good file is corrupt now. Tried rebuilding it and get the same thing, "build failed", with a bunch of errors. Anyone want to send me the hex files?

RavingLunatic
03-30-2011, 09:53 PM
Don't quit on me now.

Download a new copy of the .asm file from the wiki and start over in MPLAB IDE (don't edit outside of MPLAB IDE)

ErnieHorning
03-30-2011, 11:05 PM
I tried it and it works.

Steps I used:

1 Open MPLAB (I used 8.63)
2 Click menu Project
3 Click New
4 Type Name of Project (I used Renard DMX)
5 Click Browes Directory button
6 Click root of your project directory (I'm using c:\Documents\Mircorochip\Projects\ASM\Renard)
7 Click the New Directory button
8 Type the project directory name (I used Renard DMX)
9 Right click on Renard-dmx-20080814.asm in DIY Wiki and choose Save Target As...
10 In MPLAB, Click the menu Project
11 Click Add Files to Project...
12 Select Renard-dmx-20080814.asm
13 Click the menu View
14 Click Project
15 Double click Renard-dmx-20080814.asm under Source Files in the window
14 Click the Build All icon and select Generate Absolute Code (You should see BUILD SUCCEEDED)
15 Change line 53 to #define DMX_START_ADDRESS 2
16 Click the Build All icon (You should see BUILD SUCCEEDED)

Good luck and yes, you can do this.:)

Adamseth77
03-31-2011, 02:09 AM
I think I finally got it! I started over from the very beginning and both controllers seem to be working. I'm getting some flickering on some of the channels when they are supposed to be off though. Not sure if this has any thing to do with the start addresses or not. This may be something for a new thread. Any suggestions?
At least I got the pics programmed! Don't know that I can do it again, but maybe I am getting the hang of it now.
Thank all of you so much for hanging in there with me and for all of your support!

Adam

Mactayl
03-31-2011, 06:16 AM
I tried it and it works.

Steps I used:

1 Open MPLAB (I used 8.63)
2 Click menu Project
3 Click New
4 Type Name of Project (I used Renard DMX)
5 Click Browes Directory button
6 Click root of your project directory (I'm using c:\Documents\Mircorochip\Projects\ASM\Renard)
7 Click the New Directory button
8 Type the project directory name (I used Renard DMX)
9 Right click on Renard-dmx-20080814.asm in DIY Wiki and choose Save Target As...
10 In MPLAB, Click the menu Project
11 Click Add Files to Project...
12 Select Renard-dmx-20080814.asm
13 Click the menu View
14 Click Project
15 Double click Renard-dmx-20080814.asm under Source Files in the window
14 Click the Build All icon and select Generate Absolute Code (You should see BUILD SUCCEEDED)
15 Change line 53 to #define DMX_START_ADDRESS 2
16 Click the Build All icon (You should see BUILD SUCCEEDED)

Good luck and yes, you can do this.:)



BTW,,, MPLAB v8.66 is now available for download on Microchips website

ErnieHorning
03-31-2011, 07:40 AM
I see that I used the DMX code in the example and that Adam wanted the regular code, the procedure is the same for either though.

Adam, glad to see that you got it working. There's no difference other than what the first channel is. Renard isn't a very robust protocol so transmission errors could look like valid channels. It's likely that you're getting interference or the transceivers are too close.

Adamseth77
03-31-2011, 12:37 PM
I see that I used the DMX code in the example and that Adam wanted the regular code, the procedure is the same for either though.

Adam, glad to see that you got it working. There's no difference other than what the first channel is. Renard isn't a very robust protocol so transmission errors could look like valid channels. It's likely that you're getting interference or the transceivers are too close.

What would be a good minimum distance between controllers?

Adamseth77
03-31-2011, 12:56 PM
Another question
In a global broadcast, can you still daisy chain any controllers together as long as the first controller has a transceiver and as long as you have the correct start address for the amount of channels being daisy chained together? For instance, daisy chaining two renard ss24's to make 48. This way the controllers could sit side by side with no interference. Or would it still cause interference with the transceiver in the first controller?

ErnieHorning
03-31-2011, 02:17 PM
What would be a good minimum distance between controllers?

If they're connected by cable, there is no minimum. I'm assuming that your intent is to use XBee to go wireless, otherwise there would be typically no other reason to change the start address.

From the 'XBee-PROŽ868 Development Kit' manual: "Separate the 2 RF modules by a minimum distance of 23 feet (7 meters). If closer the modules will not damage each other, but but they may drop some packets due to high transmit power."

ErnieHorning
03-31-2011, 02:22 PM
In a global broadcast, can you still daisy chain any controllers...Yes the cable method would be just like a standard wired controller. The transceiver just replaces wire. You could also transmit between controllers if you wanted.

Adamseth77
03-31-2011, 02:34 PM
If they're connected by cable, there is no minimum. I'm assuming that your intent is to use XBee to go wireless, otherwise there would be typically no other reason to change the start address.

From the 'XBee-PROŽ868 Development Kit' manual: "Separate the 2 RF modules by a minimum distance of 23 feet (7 meters). If closer the modules will not damage each other, but but they may drop some packets due to high transmit power."

I am indeed trying to go wireless, but I am also wondering if you connect two controllers together, as long as the first controller has a transceiver, would they act as one controller? The only reason I ask is in case you need more channels in one section of the yard without having to run that many more cords from another controller to finish that part of your display.

ErnieHorning
03-31-2011, 03:05 PM
... I am also wondering if you connect two controllers together, as long as the first controller has a transceiver, would they act as one controller? The short answer is yes.

The long answer was in the previous post:
Yes the cable method would be just like a standard wired controller. The transceiver just replaces wire. You could also transmit between controllers if you wanted.

Adamseth77
03-31-2011, 03:27 PM
The short answer is yes.

The long answer was in the previous post:

Sorry about the same question twice! I'm posting from my Blackberry in the middle of nowhere and it is a little slow. Thanks for answering back twice though!