Jump to content

Cycling restart


shar
 Share

Recommended Posts

Dear Friends

I believe you could help me. I have MidiBox. It is working fine. Until LCD is not connected. When I connect LCD system goes into permanent restart:

SYSX: F0 00 00 7E 40 00 01 F7

00005080   1  --     F0  Buffer:     8 Bytes   System Exclusive

SYSX: F0 00 00 7E 40 00 01 F7

00005094   1  --     F0  Buffer:     8 Bytes   System Exclusive

SYSX: F0 00 00 7E 40 00 01 F7

000050A8   1  --     F0  Buffer:     8 Bytes   System Exclusive

SYSX: F0 00 00 7E 40 00 01 F7

000050BC   1  --     F0  Buffer:     8 Bytes   System Exclusive

SYSX: F0 00 00 7E 40 00 01 F7

000050D0   1  --     F0  Buffer:     8 Bytes   System Exclusive

During trobleshooting I found: if I disconnect the LCD and just touch any RB(0-5) pin by some isolated things (like pencil, plastic cover of cable) it is going into cyclic restart again. RB5 is the most nervous pin.

What is wrong ? Soldering ? Some additional pullups required?

Thank you.

Link to comment
Share on other sites

Hi,

The internal pull-ups are enabled at Port B, so that external resistors are not required.

The signal at RB7 could be the reason - the timeout mechanism won't work properly if the signal level at RB7 is not stable, e.g. if you've swapped D7 with another LCD pin

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi,

The internal pull-ups are enabled at Port B, so that external resistors are not required.

The signal at RB7 could be the reason - the timeout mechanism won't work properly if the signal level at RB7 is not stable, e.g. if you've swapped D7 with another LCD pin

Best Regards, Thorsten.

Thank you for your answer, Thorsten

Sorry, Thorsten, I am not quite understand. What do you mean by "swapped D7 with another LCD pin".  Soldering checked several times. I have LCD connector crimped two times . I make LCD cable shorter. Such behavior exists when LCD is disconnected and all PIC pins connected to the air. I just TOUCH (not plug) CORE:J15 by LCD connector and it goes into reboot.

Probably, you mean, if all pins are soldered and connected well PIC gets unreceptive to static ? I am using same cables and same connectors for RA, RC, RD ports, and those ports dont mind about static....

PS: PIC18F452 (MIOS 1.7/Midibox2.3)

Link to comment
Share on other sites

It is enough to touch PIC cover by finger to reboot it.

Thorsten, could some bootstrap loading errors (has not recieved one during bootstrap flashing) be the cause ?

It looks like RB port is in recieve mode, not transmit.

Link to comment
Share on other sites

D7 is a data input/output pin of the LCD - see also the schematic http://www.ucapps.de/mbhp/mbhp_lcd.pdf

Thorsten, could some bootstrap loading errors (has not recieved one during bootstrap flashing) be the cause ?

of course, if you are not sure if MIOS has been uploaded correctly, this could be one of the reasons - so long this isn't clear, it doesn't make sense to talk about possible hardware problems. I can only mention the following: even people who thought that they have super proper connections to the LCD, noticed a broken wire or a short sooner or later. Just search in this troubleshooting section for reports, it gives you a lot of inspirations what can go wrong.

It is enough to touch PIC cover by finger to reboot it.

this is really strange! Could it be that a short is anywhere else which causes a brown-out reset?

It looks like RB port is in recieve mode, not transmit.

Data is sent to the LCD, thereafter the RB port is switched to input mode and the LCD driver polls the busy flag at D7.

There is a timeout loop which ensures that the LCD driver will be completely disabled if the busy bit never goes zero (0V) - this covers the case that no LCD is connected. But if anything else drives the input (RB7) with a non-static and "strong" signal (stronger than the internal pull-up), then the timeout loop will stop sooner and later and the next character will be transmitted. If multiple characters are sent to the LCD, and the erroronous, non-static signal enlarges the timeout-loop very often, so that it takes more than 2 seconds to display a string, the watchdog (malfunction detection) will reset the chip.

However, as mentioned above: so long you haven't ensured that MIOS hasn't been uploaded correctly, such thoughts are only from theoretical nature.

My suggestion: use the new MIOS Studio to upload MIOS. It notifies errors which are reported by the core module, so only with MIOS Studio it is guaranteed that the code upload was complete.

Just load the mios_v1_7.hex file, enable the "wait for upload request" option and press the start button.

Another important point regarding software configuration: are you sure that the right display type is selected? Which LCD option did you specify in the ID header? Hopefully 0?

If you are not sure, or if you are sure that it is != 0, then do the following: disconnect the LCD, upload MIOS, upload the change ID application.

This will reset the ID to 0000000000000000

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten

During witch hunt I've found: There is no any activity at RB5, RD7 and RD6 absolutely. I've checked those pins by oscilograph. There is a 0v at those pins. Something goes wrong really. Have I damaged my PIC ?

I've uploaded "change ID", MIOS, Midibox 2.3 by java interface. It did not solve the problem.

There is only shaman dance around the box left .....

Link to comment
Share on other sites

Hi Shar,

since you have a scope, it should be very easy to find this out! :)

Take the small_skeleton application, open "main.asm" with your favourite text editor, search for "USER_Init" and add following lines:


USER_Init

clrf TRISB ; enable output drivers of port B

USER_Init_Endless_Loop
clrwdt ; feed the watchdog
comf LATB ; toggle all pins at port B
nop ; 400 nS delay
nop
nop
nop
comf LATB ; toggle all pins at port B again
nop ; nop + rgoto + clrwdt = 400 nS delay
rgoto USER_Init_Endless_Loop
[/code]

compile the code like described under http://www.ucapps.de/howto_tools_mpasm.html

(but with MIOS Studio you neither need perl + the hex2syx.pl script, just load the new .hex file directly into MIOS Studio)

After the first upload request all pins at Port B should start to toggle with a frequency of ca. 1 MHz

You could do similar tests for the other IO pins

Note that this endless loop prevents you from uploading new code so long the USER_Init routine is running.

If you want to upload new code, you have to reset the PIC - thereafter you can overwrite the endless loop with the first level bootloader

Best Regards, Thorsten.

Link to comment
Share on other sites

Addendum: I just remember that RB5 is the low-voltage programming pin.

How did you flash the bootloader into the PIC?

If you've used a Low-voltage programmer, pin RB5 will be disabled and the LCD won't work

Best Regards, Thorsten.

Link to comment
Share on other sites

Hi Thorsten

I burn it with my friend. He build JDM burner. But I remeber burn has not been done successfully at first time. My friend has read through PIC doc and found that it requires additional 5V at some pin for burning.

Have we burn it incorrectly ?

Regard, Artem

Link to comment
Share on other sites

Hi Artem,

"additional 5V at some pin" sounds very vague, if he read something about the LVP mode, which has to be selected with 5V at RB5, then I can tell you that this pin has to be tied to zero for proper operation.

If he forgot the pull-down resistor like documented at the MBHP_JDM page

(see http://www.ucapps.de/mbhp/mbhp_jdm_lvp_fix.gif

...then this is definitely the reason for the failing LCD

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...

Great! :)

Did you build MBHP_BURNER or another one?

Yes, I've build MBHP_BURNER. It is strange, but working out-of-the-box. :)

Second phase of troubleshooting: Midibox does not detect BankStick. I am using Atmel402 24c256PI. When I am trying to copy current settings into bank stick it reports "No BankStick". Very strange. As you understand it is very hard to make mistake to solder four wires :) Will try to replace flash chip with another one. How MIOS detects there is no BankStick connected? What sould be checked ?

Third question: I want to increase delay between button pressing. Contact bounce is really annoying. Where sould I change the delay value ?

Thank you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...