Jump to content

Recommended Posts

Posted

Thanks Sephult  ;D.

I think i'm having difficulty loading the sysex tho, i open midi-ox, then i switch on my box it sends F0 00 00 7E 40 00 01 F7 every second or so.

When I try to upload MIOS v1.3 syx, its supposed to verify the byte written e.g. F0 00 00 7E 40 00 0F 58 F7, or F0 00 00 7E 40 00 0F 5E F7 etc.. but mine just keeps sending F0 00 00 7E 40 00 01 F7.

Confusing :)

EDIT: Just a quick question concerning the 32 buttons configuration on the DINX4 - I understand what the Snapshot, Left, Right, and Exec buttons are for, but what are the F1, F2, F3, and F4 buttons for?

EDIT 2: RIGHT! Got the problem solved (Thanks Nat!) - the reason was i'd disabled the port (where i was told to remove the green thing from the top right i midi devices, i got confused and removed the channels and system from midi-ox events).  I just removed the midi out then enabled it again, and sent the sysex and HEY PRESTO! MIOS v1.3!

Lcd still doesnt work tho  ;D - I get black boxes on one line for about a second then they switch off and the LCD's blank..

Posted

Fine fine :)

Configuration of DINX4: note that this info is MB64/MB16E specific, the firmwares haven't been ported to MIOS yet (should be done in August...). In the meantime you can already use your box with the ain64_din128_dout128 application.

F1/F2/F3/F4 are common MIDI triggers, only in the MB64SEQ firmware they are assigned to special functions.

LCD: it seems that (most) connections are correct, the LCD will be initialized. But you should see at least a copyright message 2 seconds after startup, and thereafter a READY message. Possible problem: maybe one of the data lines (D0-D7) is missing.

Best Regards, Thorsten.

Posted

Hi all! I'm back  ;D

Thanks for your suggestion TK, i've checked all the connections again, and they are fine. I sent the following sysex string - F0 00 00 7E 40 00 0D 02 00 0B 0A 00 00 00 01 00 00 00 00 F7 and my box replied with F0 00 00 7E 40 00 0D 02 00 0B 0A 00 00 00 01 00 00 00

00 F7.

I get the black top line on initialization.

I tried messaging Seb a week ago, who has the same LCD as me to check he used the same LCD pinning, but he hasnt replied yet. But from his post it seems that he was just using the standard pinning - http://www.midibox.org/cgi-bin/yabb/YaBB.cgi?board=troubleshooting;action=display;num=1048869713

I dont know :)

Posted

Are you sure that MIOS returned exactly the same SysEx string? I don't think so... the MIDI-Ox monitor displays the output and input string, possibly you mixed them up? Or did you receive nothing? Check the MIDI Devices setup: MIDI In/Out has to be highlighted, in the port mapping you have to ensure that the input isn't mapped to the output

You are writing the you get a black line on initialization. This means that you don't have the same problem like Seb (your contrast pot is ok and you don't need a negative voltage).

Some time ago you wrote that the black line vanishes after 2 seconds. This is an important hint - is this still the case or not?

Best Regards, Thorsten.

Posted

I tried the sysex send again, this time using send/recieve sysex and it replied "F0 00 00 7E 40 00 0F 00 02 F7 "

Some time ago you wrote that the black line vanishes after 2 seconds. This is an important hint - is this still the case or not?

Yes that is still the case. Black line vanishes leaving empty lcd screen (you can tell that the power is on, but theres no characters displayed).

I dont know if it's unrelated but the back light doesnt work, but i'm not bothered about that.

Posted

Alright, "F0 00 00 7E 40 00 0F 00 02 F7"  (especially the 02) means that the LCD has been initialized and that the PIC is able to communicate with the HD44780 (reads/writes over the 8-bit bus are working). The contrast is ok.

It's totally unclear to me why you don't see any character on the screen. Sorry, but this case never happened before (in the last 4 years...) - I don't have an answer :-/

Best Regards, Thorsten.

Posted

My apologies for the long post, but i've tried to make it as detailed as possible :)

Ok. I bought a new LCD (standard 2x16) - http://www.maplin.co.uk/products/module.asp?CartID=030811172620160&moduleno=36389&Products=7 from that page.

The LCDs use the industry standard 4 or 8 bit parallel interface using the HD44780 and HD44100 (or OKI/Samsung equivalent) driver chip protocols

So it should be compatible :).

I burnt the ain_example1_v1_3 firmware and switched it on. Now the black squares stay there longer than the 2 seconds, they stay on all the time.

I have 16 pots connected and pot 7 is the one which sends CC#7 (volume).

If i move the pot up or down it sends values, which is good - if i rotate the pot anti-clockwise (so the values go DOWN) FAST the black squares disappear (they dissappear at about value 68-6A).  Note: They only disappear if i turn the knob anti-clockwise fast. If i turn it slow, they stay.

It is only the black squares on the top line.

I also tried with the ain_example3_v1_3 firmware - but i changed main.asm as follows:

USER_Init
      ;; use 16 pot
      movlw      16
      call      MIOS_AIN_NumberSet

      ;; use the AIN 4051 multiplexers
      call      MIOS_AIN_Muxed
Instead of :
USER_Init
      ;; use 1 pot
      movlw      1
      call      MIOS_AIN_NumberSet

      ;; don't use the AIN 4051 multiplexers
      call      MIOS_AIN_UnMuxed

This sends midi cc#7 volume messages pots 7 and 14 (the pots connected directly to pin 13 of the 4051's), both on channel 1.

I have 16 pots connected, with 2 x 4051's stuffed, the 3rd and 4th IC sockets are left unstuffed, and the last 16 jumper pins (where you would connect pots 17-32) are left unconnected.

Any suggestions?

Posted

First the good news: the AIN driver is working correctly. You changed the setting from "muxed" to "unmuxed", but you are using 4051 multiplexers, thats the reason for the strange behaviour of the application. In your hardware setup, only the number of pots should be changed, the multiplexers should stay enabled (MIOS_AIN_Muxed)

To the LCD: still unexplainable behaviour.

Since you are now able to upload code, maybe following simple test helps you to verify the bus connections to the LCD module.

Example: With

  bsf LATB, 0

you can set Pin RB0 to logic-1 (==5V)

with

  bcf LATB, 0

you can set it to logic-0 (==0V)

The addresses of all LCD pins:

RB0 (-> LCD D0) LATB, 0

RB1 (-> LCD D1) LATB, 1

RB2 (-> LCD D2) LATB, 2

RB3 (-> LCD D3) LATB, 3

RB4 (-> LCD D4) LATB, 4

RB5 (-> LCD D5) LATB, 5

RB6 (-> LCD D6) LATB, 6

RB7 (-> LCD D7) LATB, 7

RD5 (-> LCD RS) LATD, 5

RD6 (-> LCD RW) LATD, 6

RD7 (-> LCD E) LATD, 7

How to test all the pins easily without a scope:

Add following code below the USER_Init lable

USER_Init

Endless_Loop
      clrwdt                  ; feed the watchdog
      bsf      LATB, 0            ; RB0 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 0            ; RB0 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 1            ; RB1 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 1            ; RB1 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 2            ; RB2 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 2            ; RB2 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 3            ; RB3 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 3            ; RB3 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 4            ; RB4 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 4            ; RB4 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 5            ; RB5 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 5            ; RB5 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 6            ; RB6 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 6            ; RB6 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATB, 7            ; RB7 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATB, 7            ; RB7 = 0V

      clrwdt                  ; feed the watchdog
      bsf      LATD, 5            ; RD5 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATD, 5            ; RD5 = 0V

      clrwdt                  ; feed the watchdog
      setf      TRISB            ; IMPORTANT: for the RW pin PORTB has to be tristated to avoid a short
      bsf      LATD, 6            ; RD6 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATD, 6            ; RD6 = 0V
      clrf      TRISB            ; enable output drivers again

      clrwdt                  ; feed the watchdog
      bsf      LATD, 7            ; RD7 = 5V
      movlw      250            ; wait for 250 ms
      call      MIOS_Delay
      bcf      LATD, 7            ; RD7 = 0V

      rgoto      Endless_Loop

This will toggle all pins in an endless loop. The delay of 250 mS is high enough to visualize the pin status with a LED+resistor directly at the PIC and (more interesting) at the LCD.

(Note1: the maximum value of MIOS_Delay is 255, if you want to wait for a longer time, use MIOS_Delay multiple times)

(Note2: the clrwdt instruction ensures that the PIC will not be reset due to a watchdog timeout which happens when this instruction hasn't been executed in between 2-3 seconds)

(Note3: it's important to disable/enable the bus driver of Port B when changing the RW pin)

(Note4: don't forget the space or tab character before every instruction. Only the labels like Endless_Loop should begin at the first column)

(Note5: this code is untested)

If all pins are ok, you could have mixed the connections. In this case try the same loop with a single pin only

Best Regards, Thorsten.

Posted

Ok heres how i got on with the test -

First test - Everything lit up, so i went on to the second.

Second - Tested each pin in turn, and they all lit up (pin 8-14 for D0-D7, then 4-6 for RS, RW and E).

Sooo.. i dont really know what to do now  ::).

EDIT: I redid the test to make sure a PIC pin wasn't sending to 2 LCD pins, and it wasn't

Hmmmmmm...

Posted

STONE THE CROWS!!! I switched the power on to my Core, and sent the MIOS v1.3 firmware (to remove the LCD tests firmware) and was greeted with

MIOS V.1.3

© Thorsten Klose, then READY..

Man i'm so happy i could kiss a tramp  :-*.

I have no idea why it didnt work in the first place.. But i dont care :) it works now :D...

Time to solder my Pots back on!

Posted

Well, this shows again that visual control of connections sometimes doesn't really help. I guess that it was a bad junction which caused the trouble, and the fastest method to fix it is just to add some solder w/o checking if it is necessary or not.

Who knows, maybe another reason was that you never uploaded the complete OS...

Fine that this issue finally has been fixed. :)

Best Regards, Thorsten.

Guest dgsonics
Posted

Hi there,

Enjoy the project and the forum a great deal!  I had a few problems on the road to the MBHP nirvana, but always found the answers in the MIDIbox forum.  However, the latest one has me stuck.  

My PIC (which has no LCD as of yet to make it really happy as I've not figured out which one to buy) sends out the correct SysEx on power up.  

As my next step I tried to upload MIOS v 1.3 and have the PIC respond with 7 or 8 nine byte messages that have 0F and a different ## for bytes 7 and 8.  But after the upload is over, I still keep getting bootstrap loader SysEx every 2 sec.  Same SysEx every 2 sec after PIC is reset.  My understating is that once MIOS is loaded, bootstrap SysEx is only sent once after the power up.

I also tried to query MIOS with a SysEx, but MIOS never replies back.

Not sure what's going on.  Is there any other way to confirm that MIOS had been loaded without having the LCD connected?

Many thanks,  

???

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...
×
×
  • Create New...