shar Posted April 10, 2005 Report Share Posted April 10, 2005 Dear FriendsI 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 F700005080  1 --   F0 Buffer:   8 Bytes  System Exclusive SYSX: F0 00 00 7E 40 00 01 F700005094  1 --   F0 Buffer:   8 Bytes  System Exclusive SYSX: F0 00 00 7E 40 00 01 F7000050A8  1 --   F0 Buffer:   8 Bytes  System Exclusive SYSX: F0 00 00 7E 40 00 01 F7000050BC  1 --   F0 Buffer:   8 Bytes  System Exclusive SYSX: F0 00 00 7E 40 00 01 F7000050D0  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. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 10, 2005 Report Share Posted April 10, 2005 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 pinBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
shar Posted April 11, 2005 Author Report Share Posted April 11, 2005 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 pinBest Regards, Thorsten.Thank you for your answer, ThorstenSorry, 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) Quote Link to comment Share on other sites More sharing options...
shar Posted April 11, 2005 Author Report Share Posted April 11, 2005 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. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 11, 2005 Report Share Posted April 11, 2005 D7 is a data input/output pin of the LCD - see also the schematic http://www.ucapps.de/mbhp/mbhp_lcd.pdfThorsten, 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 0000000000000000Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
shar Posted April 12, 2005 Author Report Share Posted April 12, 2005 Hi ThorstenDuring 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 ..... Quote Link to comment Share on other sites More sharing options...
TK. Posted April 12, 2005 Report Share Posted April 12, 2005 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 BUSER_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 MHzYou could do similar tests for the other IO pinsNote 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 bootloaderBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
TK. Posted April 12, 2005 Report Share Posted April 12, 2005 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 workBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
shar Posted April 13, 2005 Author Report Share Posted April 13, 2005 Hi ThorstenI 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 Quote Link to comment Share on other sites More sharing options...
TK. Posted April 13, 2005 Report Share Posted April 13, 2005 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 LCDBest Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
shar Posted April 24, 2005 Author Report Share Posted April 24, 2005 Hi Yes! It is done! We have build new burner (parallel) reprogrammed PIC and now it is working!Thank you, Thorsten Quote Link to comment Share on other sites More sharing options...
TK. Posted April 24, 2005 Report Share Posted April 24, 2005 Great! :)Did you build MBHP_BURNER or another one?Best Regards, Thorsten. Quote Link to comment Share on other sites More sharing options...
shar Posted April 25, 2005 Author Report Share Posted April 25, 2005 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.