Jump to content

New USB 2.0 PIC coming in December


Frank
 Share

Recommended Posts

Hi Guys,

The new pic 18F4550 which is pin compatible to the 18f452 but with built in high speed USB 2.0 capabilities is slated for release in December 04. Finally a midibox for laptop use is possible without needing a midi or serial midi interface. Any USB programming experts out here up for it. Microchip says that it will provide free utilities to port existing serial code into usb code for the new pics. Good news eh? ;D

Peace

Frank

Link to comment
Share on other sites

Yes, good news! :)

But please note that the USB peripheral allocates 3 pins. This means that not every MIOS application will be compatible, some can be adapted very easy.

Maybe it makes sense to provide a special core module for this option, which can either be used as common USB->MIDI interface, or as a regular core module + USB extension for applications which don't rely on too much IO pins.

Best Regards, Thorsten.

Link to comment
Share on other sites

Of course, but this is no solution for graphical LCDs or for MIDIbox FM (where the 8 data pins are directly connected to the OPL3 data port). However, people with small assembler skills should be able to re-assign the IO pins for their needs, this saves me from writing new documentation for most of the existing projects ;-)

The applications are always written in a way which allows to define a new pinning by changing constants in the program header. Depending on the hardware which is connected to the core module, the user can decide by himself which pins are the best for his setup.

To the app note: this describes how to write a driver for RS232 replacement and won't help you for MIDI. The MIDI driver will be similar to the MBHP_USB software (which gets also use of a legacy driver...)

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 2 weeks later...

Hey Thorsten, I dunno if this would be worth the work, but have you thought of doing a multichip parrallel bus, in a multidrop network say? like maybe 8 pins reserved for talking to other cores or peripheral chips. Given the price of chips, that might not be a bad way to go for solving the runnning out of pins thing.

iain

Link to comment
Share on other sites

It's possibly not clear that we are talking about compatibility with existing projects (there are a lot of very different configurations for the core in use), and not of future projects.

Of course, if I would have to setup a new platform, I would do it different. But this is another topic and especially not in my current focus (think about the effort!)

And no parallel vs. serial link discussions please ;-) Just imagine, how much people have problems with connecting the simple parallel interface of the LCD. From the system side the problem is, that the PIC hasn't enough pins to service two independent parallel interfaces for common and interrupt tasks. Therefore I prefer serial connections.

Best Regards, Thorsten.

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Hi Andrew,

I got the PICs yesterday and was able to burn them with P18 without any failure - see also http://www.ucapps.de/mbhp_burner.html, the upcoming PIC programmer for the parallel port

Picture of the prototype (not all parts will be used in the final circuit):

mbhp_burner_proto.jpg

I've burned the USB bootloader which is provided by Microchip and allows to upload code via USB.

The USB connection also worked immediately

Prototype:

mbhp_usb_pic_proto.jpg

The final board will be much smaller, here the schematics:

http://www.ucapps.de/mbhp_usb_pic.html

Some words to the possibilities (and especially to the things which are not possible): It won't be possible to run MIOS applications on this chip due to compatibility issues. A silicon bug prevents me from re-using the code 1:1 (the movff issue), the USB DPRAM overlaps a register range which is normaly allocated by MIOS itself, and the USB bootstrap loader allocates too much memory, so that most MIOS application won't fit into the flash anymore.

However, this isn't really a drawback. The PIC18F4550 (or PIC18F2550) is so cheap, that it isn't worth the effort to create a perfectly running MIOS solution.  I will provide a firmware later which will allow people to make their extensions if they want, but most people will already be happy when they are able to connect the MBHP_USB_PIC module via MIDIbox-Link Port to the MBHP_CORE module

Now a lot of programming effort is waiting for me, because the USB framework which can be downloaded from the Microchip homepage is only available in C18 ($$$), therefore the whole thing has to be re-implemented in assembler. Maybe I will start with this at easter time (during holidays...), but if anybody wants to do this (for a GNU GPL release) - step forward!

Best Regards, Thorsten.

Link to comment
Share on other sites

TK, glad to hear you've been having success with it.  I've been using IC-Prog in the past with my programmer (the "Kit 96" programmer, aka "P16PRO40", etc.).  Sadly I don't think that it's AN589 / Tait compatible and won't work with P18.  My German is a bit rusty, so I'm going to have to try to determine whether or not P18 can be made to work with it.  Either that, or I'll wait until you finish your new PIC programmer, and I'll just buy one of those boards from Smash :)

That's cool that Microchip has a USB bootloader available for the 18Fx550 PICs... I'm looking forward to building a nice USB-based IO setup to mount in a 5 1/4" bay, and whip up some simple Labview code to make a poorman's multi-channel oscilloscope!  :)

No huge loss that MIOS applications won't work with the USB PICs... it's still nice to just have the MBHP_CORE board available as a base platform for adding extra hardware and whatnot to a system.

Link to comment
Share on other sites

Hi,

Doug: good hint, I will add a SPI port. It's just a 2-pin header at RB0 and RB1

The firmware will give enough room for such extensions. I guess that it will onl takes ca. 1-2k  (if written in assembler), the bootloader takes 2k, so 28k are still free for experiments. Performance isn't an issue (the core is clocked with 48 MHz)

Andrew: the P18 software itself is in english - it provides a hardware debugging window which allows you to check if the PIC programming pins (MCLR, Vdd, RB6, RB7) can be controlled in the right polarity. If it doesn't work, then you can possibly fix this by changing some pins at the parallel port (do you need more details?

Best Regards, Thorsten.

Link to comment
Share on other sites

Andrew: the P18 software itself is in english - it provides a hardware debugging window which allows you to check if the PIC programming pins (MCLR, Vdd, RB6, RB7) can be controlled in the right polarity. If it doesn't work, then you can possibly fix this by changing some pins at the parallel port (do you need more details?

Hi TK,

I did a quick check with P18 and the debugging window, and it was as I figured - the P16PRO40 has all the polarities reversed.  So I got out the datasheet for my PIC burner, one for the ProPic2 (which it was a rough clone of), and noted that the key difference between those two was the use of an inverted in the P16PRO40 and just a buffer in the ProPic2.  I compared that to the AN589 and Tait programmer which also just have a buffer, and also used a slightly different wiring to control MCLR.

Did a few more comparisons, and I determined that I can modify my P16PRO40 to be a Tait-compatible programmer by swapping in a 74LS07 (so that all the controls signals will be the correct polarity) and moving two resistors (to map MCLR properly).  That should do it!  The '07 just arrived from Digikey today, so with any luck I'll have a chance to modify and test my changes sometime tomorrow evening.

[uPDATE]:  I took a few minutes at work to desolder the 74LS06, a pair of 4k7 resistors (R10 and R4), and then put in a 14PDIP socket and a resistor across the parallel-port side of the socket.  Stuffed a 74LS07 into the socket, connected it up, and behold! the 18F252 I dropped into the ZIF socket was recognized by P18!

Once in a while it's nice to have little things like that work out  :D

Link to comment
Share on other sites

  • 3 weeks later...

greetings everybody,

i've started working with the 18f2550 recently and i didn't get far because i'm using a picstart plus. evidently mplab won't support the combination until version 7.1. what environment (burners/software) are you guys working with? and do you always use bootloaders after the initial burn? i haven't found too much information on this.

thanks for any pointers, and outstanding work on this platform+++

Link to comment
Share on other sites

Hi Then,

i've started working with the 18f2550 recently and i didn't get far because i'm using a picstart plus. evidently mplab won't support the combination until version 7.1. what environment (burners/software) are you guys working with?

I'm using the P18 programming software with a selfbuilt programmer, more infos can be found here: http://www.ucapps.de/mbhp_burner.html

and do you always use bootloaders after the initial burn? i haven't found too much information on this.

Microchip provides a free USB bootloader which works very fast & stable, I will post some details about the "installation" on the http://www.ucapps.de/mbhp_usb_pic.html page soon :)

Best Regards, Thorsten.

Link to comment
Share on other sites

Update: the MBHP_USB_PIC development is currently "stalled" due to a possible EUSART issue that I found during the development, and which is not part of the errata (yet?). I've created a coding example which passes on the PIC18F452 (with the old UART) and which fails on the PIC18F4550 (with the new extented UART), and I've sent it to Microchip in the hope to get a statement and especially a software workaround. We will see.

If a workaround is not possible (it happens sporadically when MIDI data is sent and received at the same time, random zeroes will be inserted into the outgoing stream), then it could mean that a lot of additional circuirity is required (e.g. an external UART peripheral), or that we just have to wait for the next silicon release.

Best Regards, Thorsten.

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...