Jump to content
Sign in to follow this  
Stuart

Landtastic problems

Recommended Posts

I am having problems with LANDTASTIC.

I have programmed the PIC using a Velleman K8048 kit programmer and experiment board.

The programmer says that the devise verifies OK.

I have programmed other devices successfully using this board.

The hex file used for programming was ldthex11.HEX downloaded from the website.

When installed in the circuit (which I have checked several times), with the jumper installed after switching on the receiver, there is a long pause after which the servo moves to full travel and back again. Another pause and it repeats the movement. Moving the transmitter stick apparently has very little effect except that, as it nears the centre position, the servo does not manage to reach full travel.

If I remove the jumper, nothing happens.

I do not have a buzzer attached, but I do have a LED mounted on the board in its place which I was hoping would give me some idea of what was going on but this does nothing.

Any suggestions please as to what the problem might be and how I should go about fault finding.

Stuart.

Share this post


Link to post
Share on other sites
The programmer says that the devise verifies OK.

(1) Are you sure the config Fuses were set correctly when you programmed the part? Be sure that they match what is shown in the documentation BEFORE the part is programmed.

(2) Is there a chance the programmer altered the OSCAL value? If this data address is erased or over-written then the PIC may not work correctly in this application.

I do not have a buzzer attached, but I do have a LED mounted on the board in its place which I was hoping would give me some idea of what was going on but this does nothing.

Assuming you did not install the 2N7000: LED anode with series 220 ohm resistor to PIC pin-3, cathode to ground.

If you are sure the PIC is fine then post clear closeup photos of the board, top and bottom.

Share this post


Link to post
Share on other sites

Thank you for your response.

(1) The programmer does not provide the oportunity to set the config fuses manually before programming. However, after loading ldthex11.HEX ready for programming it states that the config word is 39C4 which apparently is the value which appears in the disassembly of ldthex11.HEX. After programming it says that the config word is 11C4 and it gives the opportunity to view the configuration status. When viewing it, the following boxes are checked: BGO (Bit 12), BODEN (Bit 6), /PWRTE (Bit 4) and FOSC2 (Bit 2).

I am rather confused (having had no PIC programming experience) by this config business because the screen shot example in www.rc-cam.com/ldtastic.htm with the fuses set as required, shows a config word of 3184.

(2) I purchased the Velleman-kit because I knew I would not be needing to program many PICs and it was not worth spending a lot of money on a prorammer. Unfortunately you pay for it with a lack of versatility. This programmer does not give you the opportunity to determine the contents of the device until you have programmed it; therefore it is not possible to determine the value of OSCCAL of a new device. However I have programmed this device four times now and every time the contents of 03FF (where I understand the value of OSCCAL is stored) has been 342C. This means either (a) it is not being overwritten or (B) it is being overwritten by the same value. Unfortunately I have no way of determining which. Incidentally, just for my information, is the value of OSCCAL different for each device? If it is important that this value does not change, couldn't ldthex11 read the contents of 03FF at the beginning of programming and write that value back in at the end? Or is this not what is required and is it important for the value to remain constant throughout the programming?

I have installed the 2N7000 to drive my buzzer simulator LED because I assumed that the PIC would have insufficient current drive capability to drive the LED direct. I have a 130 ohm resistor in series with the LED which has its anode connected to the positive rail. I have more confidence in my circuit than I have in the PIC programming.

Best regards,

Stuart.

Share this post


Link to post
Share on other sites
After programming it says that the config word is 11C4 and it gives the opportunity to view the configuration status. When viewing it, the following boxes are checked: BGO (Bit 12), BODEN (Bit 6), /PWRTE (Bit 4) and FOSC2 (Bit 2).

The config word seems reasonable. Some of these data bits are dependent on the default fuse bits, so the exact value can vary. So, ignore the word value and just observe the displayed setting descriptions.

This programmer does not give you the opportunity to determine the contents of the device until you have programmed it; therefore it is not possible to determine the value of OSCCAL of a new device.

They don't have a chip "read" feature? What were they thinking! Write them and complain.

just for my information, is the value of OSCCAL different for each device?

The OSCAL and Bandgap bits are determined by the factory during manufacturing. The exact values are up to the silicon gods and will vary among wafers due to process variations.

If it is important that this value does not change, couldn't ldthex11 read the contents of 03FF at the beginning of programming and write that value back in at the end?

Yes, that is exactly how it should work if the programming tool is designed correctly. Some default to this and others {unfortunately} default to using the hard coded value that is in the hex file. It is important to configure the programming tool to use the value in the PIC and not in the file (unless you have reason to do otherwise).

I can confirm that the hex file is a working program and the hardware schematic is correct. So, the problem is likely in the chip burning tool or a wiring error that has escaped the mortal eye (that is why sharing close up photos is valuable).

At this point I am out of ideas. If you need to, you can send me a chip and I can see if it works in my board to confirm if your Velleman programmer tool is working. But, it might be helpful to see some photos of your board's wiring first just to see if there are any gotcha's on it.

BTW, what is the voltage you are using to power the Landtastic?

Share this post


Link to post
Share on other sites

I tried to send photos, but they are too large even when zipped.

The voltage appearing at the PIC pins 1 and 8 is 4.98V with the servo stationary and 4.87V with it moving.

Share this post


Link to post
Share on other sites

The photos should fit with room to spare if you scale them to 72dpi. So that they fit without overflowing the screen, reduce them to 700 pixels wide while you are at it.

The voltage is good.

Share this post


Link to post
Share on other sites

post-4856-1217528963_thumb.jpg

post-4856-1217528984_thumb.jpg

I'm really proud of myself managing to manipulate these images as you suggested.

I've uploaded them as attachments and inserted them into the text editor.

I hope that is what I had to do because I couldn't find any guidance on managing attachments.

Perhaps you could advise me if I should have done something different.

Regards,

Stuart.

Share this post


Link to post
Share on other sites

Those photos are perfect. I may have missed something, but the only thing that looked wrong is the 2N7000 transistor that drives the little red LED. It appears backwards (source and drain swapped), which may explain why the LED does not work. Check the pinout before taking my word for it.

Since the board looks reasonable, there must be something wrong on the PIC end of the business. What is the PIC part number you installed?

Share this post


Link to post
Share on other sites

The source of the 2N7000 you mention is definitely connected to ground, so that's OK.

The PIC part number is PIC12F629.

Do you have any of these devices? If you do, could you have a look at their OSCCAL values please and let me know them to see if the values I am reading are in the right ball park?

Thanks,

Stuart.

Share this post


Link to post
Share on other sites

Any word value is likely, so it won't do any good to compare it to mine.

Rather than continue to beat the OSCCAL to death, let's see if the PIC is alive: Disconnect the R/C Rx and servo from Landtastic. Remove the programming jumper too. Apply power to the board. After a couple seconds, the strobe pin should toggle at a slow rate. This is the lost R/C signal feature in action, which slowly flashes the strobe LED. If the strobe pin does not toggle, then the PIC is incorrectly programmed or has been damaged.

EDIT:

In case you wish to try it, I found this Velleman compatible programming software tool using Google:

http://freenet-homepage.de/dl4yhf/winpicpr.html. It can read PICs too, which is something I understand you cannot do now. Start with a fresh PIC and read the OSCCAL (record the value for backup). Before programming it be sure to configure the tool so that the OSCCAL word is NOT programmed too. Otherwise you'll still be chasing your tail. I have no experience with it, so I cannot help operate it or confirm it works well with the PIC12F629.

Edited by Mr.RC-Cam
Found WinPIC App.

Share this post


Link to post
Share on other sites

Progress!!

But I have to eat humble pie.

Thanks to your idea of just providing power to the board, I was able to investigate it in a known state.

I found that the PIC pin 3 was toggling merrily but my buzzer simulator LED was not lighting.

Investigation revealed that the LED was in the circuit the wrong way round (OOPS). I don't know how this came about unless I confused myself with it being connected to the positive rail rather than ground. I thought I had better check my landing light LEDs too. These also were reversed. I changed them all around and the landing lights worked but my buzzer simulator still didn't. I then discovered that the LED was U/S. I replaced it and it started flashing away like a good 'un.

I have now found that everything works perfectly to the setting-up instructions using a standard servo but not with the SuperTec S136GH retract servo I had obtained to do the job. Rather than varying the speed of the servo it varies the delay between operating the switch and the servo starting to move from very little to ten seconds or more.

It needs to be a retract servo to get the 180 degrees movement.

Will all retract servos be the same, or is a feature of the SuperTec?

Regards,

Stuart.

Share this post


Link to post
Share on other sites

Ahh, there is always a perfectly good reason for everything. Glad to hear you found the bugs.

Run of the mill retract servos are not proportional. They only have two positions, up and down. For Landtastic, you need a proportional servo. If you must use a "retract" servo then Airtronics sells one that is proportional (be sure to consult their specifications to ensure you get the correct one).

Or, you might want to investigate using a Hyperion Atlas digital servo. It can be user programmed for 180 degree movement. You must get the programmer in order to tweak its settings. Heck, with an Atlas, which has programmable speed, you might not need Landtastic at all if you don't care to use the lighting system.

Honestly, I think you are good to go. Everything sounds like it is working now.

Share this post


Link to post
Share on other sites

Thanks for the info.

I would just like to sincerely thank you for all the time and effort you have put in to help me out with this problem.

Best regards,

Stuart.

Share this post


Link to post
Share on other sites

You are welcome. And thank you for coming back to report what you found.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×