Hi,
I was looking for the hardware files for this project? I couldn't find them. Are they available somewhere.
Thanks.
Sorry about that, it wasn't in SVN. I had to do some digging, but I found them. They are now in SVN, and I attached a copy here. I believe I have some firmware too. Here's my notes from the prototype build:
viewtopic.php?f=19&t=825&start=150#p12060 (http://dangerousprototypes.com/forum/viewtopic.php?f=19&t=825&start=150#p12060)
Thanks Ian.
I ordered one from free coupon code (thanks so much, that is such a cool program), I'll give the build a try (I think it was version 1 and you posted 1a but I'll figure it out once the board comes). A couple mods I am thinking of:
1. 5v power, I'll have to look at it when the board comes, I wasn't sure if is supported a selection like some of the other versions.
2. I think I'll run in 4-bit mode and maybe put some surface mount headers on the solder jumpers (if they will fit) and use the extra pins for even more extensions.
What I am thinking is sort of a universal remote for all my projects -- an LCD and a bunch of input devices (pots, buttons --- whatever I can fit with the pins I have) communicating with a serial interface (from the RX/TX and USB) to attach to whatever I am controlling. That way I can build debug info or configuration interfaces into my projects and then attach to them with my universal remote without having to drag a computer around with me (I have done this with other projects for debugging)
Thinking out loud --- putting an SD card as a logger and then be able to review the log right on the LCD might be cool (I think my eyes are bigger than the number of pins I will have, but anyway.....)
This is going to be fun.
The board came!!! I'll start designing the extensions and get a parts order together
I finally got around to populating the board on my free PCB. It's mostly done, but before I finish with the parts, I need to take a look at the firmware. Tonight all I was able to to was connect it to a pickit2 and see that the programmer recognized the device. That is a good start. I think I'll look at the rest of the firmware issues tomorrow. I guess I'll start to see if I can use the open source USB stack.
whoops! Looking at the picture, I just noticed that I put C6 in backwards! OK, I'l fix that tomorrow too.
I put i n C3 or C4 backwards on this same design and it poped clean off the board with a mighty snap.
[quote author="ian"]I put i n C3 or C4 backwards on this same design and it poped clean off the board with a mighty snap.[/quote]
Pictures, or it didn't happen! Idea for a workshop video?
It is long gone now. I did try hard to recreate it for a magic smoke video, but was unsuccessful.
Firmware:
I am trying to get some signs of life from the usb firmware, no luck so far.
I am using the USB demo from the DP usb stack. I am using the latest code from the repository. I built it with MPLABX and the C18 compiler (lite). When the hex file loaded fine on the chip but the device does not enumerate. Windows says -- unknown device.
With an led poked into the PGD line I am able to see that the code never comes out of the loop waiting for (usb_device_state < CONFIGURED_STATE);
I also took a look at it with usbdog and I see that 5 requests are made to the device but nothing ever comes back from the device. My guess is that the PLL and OSC are not configured correctly, but I'm not sure. I set the define IANS18FJ, so it looks to me like it should be setting up the PLL and I confirmed with an LED that it is getting into that code.
Any thoughts on how to debug this? I've never worked with USB before, so I'm not very familiar with how the enumeration is supposed to work. Thanks!
just a little more info.
I did turn around the C6 cap which is the one on VDDCORE pin, and I measured 2.45v on that cap after I turned it around, so I think that means that the internal regulator is enabled and working correctly.
some progress.... I found that the PLLDIV was set to 4, is should be 5 with a 20Mhz crystal. Now the device is recognized as CDC test, however it fails to load the driver. I thought that this should use a standard driver--- do I have to install something on windows 7 to make this work?
OK echo test is working. I made an .inf file from the microchip one with the vid and pid that the thing was reporting!
(mchpcdc.inf line 89 and 92)
So now it echoes back what I type..... very cool.
Lets get an LCD in it now!
This space intentionally left blank :) Life is good
Nice job, thanks for the update. I think it is best practice to use a 16mhz crystal and the other divider instead, 20mhz is fine for 18f2550, bu the J chips have 16mhz max eternal. I'm sorry about the error in the schematic, this project was never developed must further than a first prototype.
I can check your source into SVN if you would like to share it.
adding... When we used the wrong crystal on 1000 Logic Sniffers, it caused a problem in only 2 or 3, so it is not required to swap if it is working for you now :)
It seems to be working with the 20Mhz crystal, so I'll keep going with it.
I'm still working on the firmware with the latest usb_stack fromt JTR's site, it is newer than the one in the svn. I am having some issues,I will post in the other thread about that. I'll get an official "thanks DP" picture once it is working, and I'll get the source pretty for you to take if you want.
And, here it is the official "thanks for the Free PCB" picture:

Important attributes:
1. PIC18F24J50
2. open source USB stack V0.2a
3.20MHz crystal
4. Hardware V1
Todo:
1. clean up the code with appropriate #IFs for all the attributes.
2. get 4 bit mode working
3. turn on the UART to get Tx/Rx working
I so want one of those :D
I am making progress. I have sorted out 4-bit mode and I went ahead and soldered it onto the LCD and broke out all the pins.

Because I am using 4-bit mode and I grounded R/W I have 9 pins for future use.
My next step will be to get the UART working.
Here is "my" source code. Features of this code
1. works with 18F24J50 V1 board from the free drawer
2. supports 4-bit mode.
3. uses the JTR USB stack version 0.2a
I tried not to break too much and have tried to #ifdef everything in case anyone wants to try to use it will different boards.
Like I said before, I'm going to be adding UART support next.
If anyone is still listening to my stream of consciousness :)
I am sure I am re-inventing a few wheels here in the name of science, but at least I am learning stuff. I thought I would try getting this going through the bootloader for fun. And I am having some problems (as usual).
The boot loader runs and appears to load the code correctly, but then does not run. I assume this has to do with either linker or configwords.
For linker I have:
LIBPATH .
#IFDEF _CRUNTIME
FILES c018i.o
FILES clib.lib
FILES p18F24J50.lib
#FI
CODEPAGE NAME=bootloader START=0x0 END=0x7FF PROTECTED
CODEPAGE NAME=vectors START=0x800 END=0x829 PROTECTED
CODEPAGE NAME=page START=0x82A END=0x3FF7
CODEPAGE NAME=config START=0x3FF8 END=0x3FFF PROTECTED
CODEPAGE NAME=devid START=0x3FFFFE END=0x3FFFFF PROTECTED
Should 0x800 be vectors? or page?
For the config words, I just set the same config in the pickit2 standalone app to the same values as I have in the backpack code.
So, does anyone have some advice on how to link the code to make the bootloader work? Thanks
0x800 is vectors
The linker seems correct to me, but I have issues getting the bootloader jump to work properly often.
I put the bootloader problems aside and finshed the UART support. This version will work from either USB or the UART. As proof see the picture of LCD Smartie running through the Bus Pirate in transparent UART mode:

The code is attached if anyone is interested
Did you ever get the bootoader working? I spent a couple of hours on trying the Diolan bootloader to work on a pic18f25j50 but it only writes data in every 32'rd (or was it 16th?) byte.
I never did get it to work. I haven't tried in awhile. I never really tried to debug it. What to try together?
Sjaak is working on the same bootloader for the same chip I think on his LCD board. It should be pretty straight forward - start with the 18F24J50 version in the SVN. T he only real change I am aware of is to change the flash pages count and hardware include file.
Then you'll need to attack the PC app, and my recommendation is the version Robots did for the OLS. It is in his own github. I think it is called ols-loader. I have not looked through the source yet, but I imagine it is a define somewhere for number of flash pages.
How this project is completed? Is it working fully, with the USB/UART and bootloader? Could you kindly share your final results - I'd like to try to build this backpack on the older 18F2450, do you think it would run? I'm still a newbie with PICs, so your advise is very much appreciated - what had you changed in the initial sources for 2550 for it to run on 24J50? Thanks a lot in advance... And it would be much much wonderful if I can get a free PCB for this project too?.. Tried every Sun and Fri without luck :-(