1
Show Posts
This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.
Messages - wallabybob
2
Web platform / Where is the bootloader for the web platform?
3
Web platform / Re: Linux Development
There is a Linux loader for Bus Pirate, it might work. They use the same bootloader.
[/quote]
I presume you mean pirate-loader which requires bootloader 4+ in the PIC. I'm pretty sure my web platform predates bootloader 4+.
Update to the ds30Loader problem I reported earlier. ds30Loader doesn't understand "~" in file specifications. When I specified the full file path it reported sensible things about the file but timed out waiting for response from the bootloader.
4
Web platform / Re: Linux Development
I've also been unable to get ds30 loader working on Ubuntu 10.10 amd64 and I have reported that in the ds30 forum. The command line to fire up the non-GUI loader is pretty non-intuitive, but someone in the ds30 forum managed to get further than I did. Here's what happened:
I tried to invoke ds30LoaderConsole on a fairly stock Ubuntu 10.10 server system and it complained:
Code: [Select]
$ mono ds30LoaderConsole.exe --port=/dev/web_platform --baudrate=115200 --file=${FILE} --device=dsPIC33FJ128GP204 --write-program
** (ds30LoaderConsole.exe:18243): WARNING **: The following assembly referenced from /home/ozybushwalker/Downloads/ds30 Loader/bin/GHelper.dll could not be loaded:
Assembly: System.Windows.Forms (assemblyref_index=1)
Version: 2.0.0.0
Public Key: b77a5c561934e089
The assembly was not found in the Global Assembly Cache, a path listed in the MONO_PATH environment variable, or in the location of the executing assembly (/home/ozybushwalker/Downloads/ds30 Loader/bin/).
** (ds30LoaderConsole.exe:18243): WARNING **: Could not load file or assembly 'System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.
Unhandled Exception: System.MissingFieldException: Field 'GHelper.clsDebugTextbox.bConsole' not found.
After installing package libmono-winforms2.0-cil things moved along a bit further:Code: [Select]
$ sudo bash
[sudo] password for ozybushwalker:
root@vbox:~/Downloads/ds30 Loader/bin# mono ds30LoaderConsole.exe -l --port=/dev/ttyUSB0 --baudrate=115200 --file=~/test.hex --device=dsPIC33FJ128GP204 --write-program
Loading port plugin ds30LoaderPortIxxat.dll: no supported on this OS
Loading port plugin ds30LoaderPortKvaser.dll: no supported on this OS
Loading port plugin ds30LoaderPortPCAN.dll: no supported on this OS
Loading port plugin ds30LoaderPortSerial.dll: found 5 ports
Loading port plugin ds30LoaderPortVector.dll: no supported on this OS
Loading external device database...408 devices foundNon-existing file specified.
$
~/test.hex exists, root has access to /dev/ttyUSB0.
I was also unable to get ds30 Loader GUI.exe to download the hex file. It didn't report any non-existent files but did report a timeout.
Anyone have a suggestion for getting either ds30Loader working or a suggestion for an alternative loader?
5
Web platform / Re: Web platform manual
[quote author="wallabybob"]
It seems this is not true with current MPLAB. Perhaps the compiler automatically includes the appropriate file (e.g. p33FJ128GP04.h) (based on the MPLAB Configure -> Select device choice?)
[/quote]
What version of MPLAB do you use? I am using version 8.43 and if I connent out the first line in HardwareProfile.h
[tt:]//#include
I get of course lots of errors.
[/quote]
I use MPLAB 8.46. The build output reports the tools versions as
Quote
Language tool versions: pic30-as.exe v3.23, pic30-gcc.exe v3.23, pic30-ld.exe v3.23, pic30-ar.exe v3.23
The build output reports the compile command as:
Quote
Executing: "d:Program FilesMicrochipMPLAB C30binpic30-gcc.exe" -mcpu=33FJ128GP204 -x c -c "MainDemo.c" -o"Objects - TCPIP MDD Demo App-C30MainDemo.o" -I"." -I"..MicrochipInclude" -I"%PROGRAMFILES%MicrochipMPLAB C30include" -g -Wall -mlarge-code
I came to speculate Perhaps the compiler automatically includes the appropriate file (e.g. p33FJ128GP04.h) because I started with some of the Microchip sample files and failed to look sufficiently deeply into the nested include files. The -mcpu=33FJ128GP204 compiler command option causes the compiler to define __dsPIC33F__ and __dsPIC33FJ128GP204__ MainDemo.c includes "TCPIP Stack/TCPIP.h" which includes Compiler.h from the Microchip include library; Compiler.h includes (because __dsPIC33F__ is defined) p33Fxxxx.h from the Microchip include library (... MicrochipMPLAB C30supportdsPIC33Fh) and p33Fxxxx.h includes (because __dsPIC33FJ128GP204__ is defined) p33FJ128GP204.h from ... MicrochipMPLAB C30supportdsPIC33Fh
For greatest portability it might be useful to include Compiler.h (#include
6
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
I guess your webpage look similar to the attachmnent in
http://dangerousprototypes.com/forum/in ... 41#msg3241
[/quote]
Yes, but not as much is displayed.
About the PicKit2: need a special connector to link it to Web Platform? need special boot software or debug software in the web platform? (I've been using dsPIC30 to reflash the web platform.)
7
Web platform / Re: Web platform manual
It seems this is not true with current MPLAB. Perhaps the compiler automatically includes the appropriate file (e.g. p33FJ128GP04.h) (based on the MPLAB Configure -> Select device choice?)
I think it would be helpful to add a section to the dsPIC33 programming page to discuss interactive debugging options, if any.
Update: At first I thought p33Fxxxx.h was a template file name with the xxxx to be replaced by (presumably) a device specific string. This is because a file search turned a bunch of files with names p33FJ06Gs101.h p33FJ06GS102.h ...
Then I found a file whose name is actually p33Fxxx.h which just has a string of tests to determine which model specific file to include.
But it doesn't seem necessary to include p33Fxxxx.h
8
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
I reinstalled the Microchip Libraries and updated the sources for TCPMDD SD Card Demo as described in the README.TXT file Google library BUT I retained the Microchip web page files which I copied to the SD card. I've reloaded the firmware and (powerup) restarted the web platform a number of times and I've only seen the dynamic page variables (e.g. ~version~) expanded the first time I ran the new build, though the ~inc:header.inc~ mostly seems to get processed. Typically the page text is truncated mid-word (e.g. page ends with "configu" rather than "configuration ..."
What do people use as an interactive debugger on the web platform?
9
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
I guess I have inadvertently selected an incompatible combination of build options trying to get the server to use just the SD card, not the EEPROM. I started with the Microchip TCPIP MDD SD Card Demo App
10
Web platform / Re: Dynamic Variables (~inc:header.inc~) in SD Card Server not working
By stepping through HTTP2_MDD.c (which really is a mess of a state machine) I noticed, that the files 'DynRcrd.bin' and 'FileRcrd.bin', which are generated by MPFS2, have to be copied to the SD card too.
[/quote]
How do you get MPFS2 to generate DynRcrd.bin and FileRcrd.bin?
My attempts generated only one file: (default name) MPFSImg2.bin which I presume needs to be uploaded to the board. Supposedly this can be down through a web browser by adding /mpfsupload to the end of the url:, e.g. http://192.168.211.215/mpfsupload/ but this only gets me a different variant of the home page.
Maybe I haven't found the appropriate documentation yet, but using the microchip software to make a web server seems unnecessarily complex.
11
Web platform / Re: USB Power Supply
12
Web platform / Re: ds30 Loader Found unknown device
Furthermore there are no LEDs visible with the usb plugged in.
[/quote]
Are you expecting power for the board from the USB port? It needs a separate power supply. When my board is plugged into the USB port alone, none of the LEDs come on. When I plug in a 4xAA battery pack the PWR LED comes on as do the SD, LD1 and LD2 LEDs.
13
Web platform / Re: The webbserver stops, Problems with ENC28J60??
Code: [Select]
ENC_SPICON1 = 0x17; // 1:1 primary prescale, 3:1 secondary prescale (10MHz @ 30MIPS)
Here it is. The SPICON1 controls the prescaler ratios. It's setup for 10MHz @ 30, which is probably ~13mhz at 40. I believe the ENC28J60 is rated up to 12MHz.
[/quote]
I downloaded the Microchip TCP/IP stack yesterday and in my enc28j60.c the referenced line is inside a #else conditional that shouldn't be active because its preceded a few lines back by
Code: [Select]
#if defined(__PIC24H__) || defined(__dsPIC33F__)so it looks as if the code intends to set the SPI clock to 8MHz on dsPIC33Fs.
ENC_SPICON1 = 0x0F; // 1:1 primary prescale, 5:1 secondary prescale (8MHz @ 40MIPS)
// ENC_SPICON1 = 0x1E; // 4:1 primary prescale, 1:1 secondary prescale (10MHz @ 40MIPS, Doesn't work. CLKRDY is incorrectly reported as being clear. Problem caused by dsPIC33/PIC24H ES silicon bug.)
#elif defined(__PIC24F__)
Isn't this in your code?
14
Web platform / Re: Secondary Oscillator not running
Here's my working code
[/quote]
What file is that code snippet in?
15
Web platform / Re: MAC address
"Random" MAC addresses don't really solve the problem because there is still the chance of duplication. Perhaps an analysis might show that a particular algorithm or generating "random" addresses minimises the likelihood of collision with other web platforms, but that doesn't cover all the other stations on the LAN that need to have unique MAC addresses.
For some time now I've been interested in a cheap datalogger capable of logging from a number of sensors for periods of up to a few days. In Nov 2009 Silicon Chip, an electronics magazine, published plans and circuit for a "web server in a box" using a 28 pin dsPIC33. It looked close enough to what I had in mind to be useful to me BUT they had to remove DHCP client so the code would fit into the 64k available on the model they chose. The Microchip document on their TCP stack says the DHCP client takes about 1200 bytes so there would apparently be little scope for further enhancements to the Silicon Chip server. I emailed Silicon Chip a number of suggestions including that they do a respin using a PIC with larger program memory and more pins for more i/o. A few weeks later I stumbled across the Web Platform which looked to be more useful to me than the Silicon Chip design as well as being cheaper and more compact.
I think the Web Platform has great potential as a datalogger. There is a good range of cheap sensors available for temperature, light intensity, magnetic fields etc. The cheap sensors are not usually accurately calibrated so they are not useful where precision is required but they are useful for logging changes or measuring changes.
A web platform with suitable sensors could be a very useful tool in school laboratories but if they are networked they need unique MAC addresses.
A web platform with its digital outputs could be a useful appliance controller. Again, unique MAC addresses are needed to network more than one.
I noticed the Networked LED driver proposal (http://whereisian.com/forum/index.php?topic=210.0) recognises the need for unique MAC addresses so more than one can be connected to a network. What's different about the Web Platform that it doesn't need a unique MAC address?