Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - bluesign2k

16
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
Right, I've just realised what you mean about how the data lines should be 3.3v... I see the clock line is on RB4... one of the config bits sets RB0:4 as either analogue or digital on startup. So I think if you change PBADEN to digital instead of analog then that should sovle the issue.

Chris
17
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
Sweet! Glad to see your getting somewhere now! :D

So, onto the next problem...
I see you've got a real thing for changing those transistor haven't you;) What transistors are you using? Have you checked the datasheet for the replacement device(s) to verify pinouts etc.

This might also be stating the obvious but since it's usually the obvious that we all often overlook... have you made sure that PGD and PGC are connected from the programmer to the targed board correctly. I notice your programmer appears to use the standard Microchip "pinout", whereas the WebServer board had the PGD and PGC pins swapped.

It's not really valid to just measure the voltage on Vpp, PGC or PGD as they're data lines so won't have a steady state when they're working... this is where a scope/logic analyser comes in handy.

Regarding what needs powering... I use and ICD2 and power the target board. It's the way I'd suggest you and others do it too. However, if you are going to do it this way then remove/cut/remove track for the Vdd line between the programmer and target board unless you have some protection circuit in there somewhere. I take it the programmer you've built is the one shown in schematic labeled "Brenner 9L", if so you can remove the jumper on JP2 and this will isolate the two Vdd.

Chris
18
Bus Pirate Support / Re: layout of the text for the ? command
Dump hyperterminal and use PuTTY instead? There's planty of scrollback for logging etc and has a nice simple interface.

Other than that your suggestions seem good if you want to continue using hyperterminal.
19
Bus Pirate Support / Re: Bus Pirate easter egg
I had found the easter egg in the older software, haven't got around to updating yet... I guess you've changed it later versions. I'll give it a go tonight :D
20
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
I think you config bits are wrong. Attached is the page from the datasheet regarding clock scalers.

Notice how the 96MHz PLL required for the USB requires a 4MHz input. If you have a 20MHz crystal then you need PLLDIV to be 5 to give the correct 4MHz input. With the settings you have at the moment your only giving it 2MHz.

Now because your using the 96MHz PLL (becuase your using a 20Mhz crystal) then you need to enable the USBPLL too.

It looks like you have the correct settings for the oscillator, just to make sure though, it should be the HSPLL. ie high speed with PLL.

Ok, so thats the USB stuff set, CPUDIV is then used to set the oscillator frequency for the rest of the CPU. Notice on the diagram theres two bits labled as CPUDIV. Now because you using the HSPLL your onluy interested in the right hand scaler. So the frequency going into the postscaler is 96MHz and we're after 48MHz so CPUDIV should be set to divide by 2 (assuming your wanting the core to run at full speed, if you have a circuit where low power is critical then you can select a higher value to reduce power consumption).

Turn off the watchdog timer becuse unless your program actually makes use of it then the PIC just keep resetting itself. I also turn off the brownout detect becuase if the voltage drops too low then you have bigger problems anyway.

So to clarify set:
USBPLL to "on" or "/2" wichever it calls it
PLLDIV to "/5"
Oscillator to "HSPLL"
CPUDIV to "/2"
Brownout to "disabled"
Watchdog to "disabled"

I think that should do the trick...

Chris
21
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
[quote author="rvbcrs"]
Thanks Chris for your great reply, I checked and veryfied the flash again and saw there was something going wrong near the end. It turns out the "MicroPro" flash tool that came with the flasher has a bug! I used another version and now the flashing process was ok!

I tried the 18F2550 in the brenner9 I hear a sound in Windows now, but no it says "Unknown Device" and it says windows has disabled the device because of a problem.
I guess I'm a bit further now, but It still doesn't work. I guess it has something todo with the transistor I used instead of the BF959 one. I guess I have to look for a place to buyt that one.
[/quote]
The BF959 shouldn't make any difference at this stage, that's only used to control Vpp during programming.

Providing the code is correct you should only need minimal components to make an 18F2550 talk to windows... more than half the components in that circuit are irrelevent at this stage. Have you got a scope? Have you checked that the oscillator is running? I had a programmer that used MicroPro and I had these very same problems (hence why I dumped it for an ICD2). Im still quite sure that you problem is that the programmer is not flashing the correct config bits. Usually if windows detects the pic but cant recognise it its usually because the clock isn't running fast enough. The verify function on the version of MicroPro that I had didn't verify the config bits. Check whether MicroPro is overriding the settings for the config bits in the hex file.

Let us know how you get on.

Chris
22
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
There should be a button with the software for the 40 Pin flasher to verify the flash. If you can do this and your sure the code your flashing is correct then Id suggest you have a hardware fault...

Have you done the basices like checking the supplies, if there an external crystal/oscillator then is it running? Is the MCLR pin being pulled up sufficiently? Since your trying to use USB are D+ and D- the right way around? Have you made sure the capacitor on Vusb is there and of correct value? Cant think of anything else at the moment but I think those are the basics...

Other than that the only thing I can think that may be wrong is that you programmer isn't setting the right config bits... which is quite a common issues when using 3rd party pic flashing software.

It sounds like your not far off, I'd keep at it until your ICD2 clone arrives.

Chris
23
Hack a Day projects / Re: Programming the PIC24FJ64 on the BC Webserver
I have a homemade willem programmer and while its fine for old EPROMS it won't do 24 series PICs. I wouldn't touch those ebay ones with a barge pole, longterm they always end up to be more hassle than they're worth... particularly the poor copies from china.

Go for a proper pickit2... Im sure they're cheaper than the ebay junk too!
24
Hack a Day projects / Re: Updated software
[quote author="ian"]
I'm interested in upgrading to the latest TCP/IP stack (v5.0), and perhaps substituting a pin-compatible dsPIC33 for the 24FJ64GA002.
[/quote]
Im currently in the process of working throught the v5.10 stack to make it run with the business card web server. I don't think there's too much to change but I only started on it last night and I only get the odd half hour here and there... but once it's done I'll upload it here. I'd like to get it working so it can handle the dynamic cgi pages too this time... I tried this with the old stack but didn't get very far.

Ultimately I'd also like to get it working with the HTTP2 version as it adds a bunch more functionality. Unfortunately I think there will be a lot of work involved to convert it from using MPFS2 to SD/FAT... anyway, I'll start with the simple stuff first and hopefully get the HTTP2 working later :D
25
Hack a Day projects / Re: Web server build with live site
[quote author="Scorpia"]...
also any chance of posting the code changes you have made to get it running on port 81. i had a search when i was looking at it but i couldnt find it...[/quote]

At the top of FATHTTP.h you'll find:
Code: [Select]
#define HTTP_PORT               (80u)

Change to 81u (or whatever port number you like) and bob's your uncle ;)
26
Hack a Day projects / Re: Web server build with live site
With respect to the going slow problem...

As I remember the original code was slower that it could be because it didn't initialize the clock divider to work at full speed. Just having a quick look at the copy of the source I use for my server I have the following line in the "InitializeBoard" function:

CLKDIVbits.RCDIV0=0;

This enables the pic to run at the full 32MHz (16mips) rather than the default 16MHz (8mips).
27
Hack a Day projects / Re: A failed v2 prototype
Ah, yeh, I'd seen that article. I thought you may have integrated the LCD on the v2 board... which is what I'd tried to do previously. It was a little tricky though as the LCD used 9-bit SPI so the code had to turn off the hardware SPI when sending the last bit. I got the LCD to work on a seperate board (same PIC) but never managed to find the bugs when I merged the code into the webserver source.
29
Hack a Day projects / Re: A failed v2 prototype
Id be quite interested in seeing what you did with the LCD. I bought a 132x132 LCD off ebay (like this) a little while ago with the intention of adding it to my web server to display IP address etc. It's pretty cool because the board it comes with sorts all the necessary power supplies etc.. I never actually got around to it but now I've come across this forum I might dig it out again and give it a go! :D
30
Hack a Day projects / Re: Updated software
For those who are interested I've attached an updated version of FTP.c which allows you to upload, download and delete files from the web server's SD card as well get the directory listing using the command line ftp in windows. You can change the password by editing the necessary lines at the top of FTP.c, by default they're both set to "ftp".

To get it going you'll also have to makd the following changes/additions:
1) in TCPIPConfig.h:
a) add the following line in te application options section
Code: [Select]
#define STACK_USE_FATFTP_SERVER

b)change
Code: [Select]
#define TCP_ETH_RAM_SIZE					(1000ul)
to
Code: [Select]
#define TCP_ETH_RAM_SIZE					(1500ul)

c) uncomment and edit these lines
Code: [Select]
{TCP_PURPOSE_FTP_COMMAND, TCP_ETH_RAM, 100, 40},
{TCP_PURPOSE_FTP_DATA, TCP_ETH_RAM, 200, 200},

2) in StackTsk.c:
a) add the following in the StackInit(void) function
Code: [Select]
#if defined(STACK_USE_FATFTP_SERVER)
    FTPInit();
#endif

b) add this in the StackApplications(void) function
Code: [Select]
#if defined(STACK_USE_FATFTP_SERVER)
    FTPServer();
#endif

It's probably not the best code in the world... but it works. Hopefully someone will find it useful :)
Chris

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01642450528session_write_close ( )...(null):0
20.01672582144ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01672582920Database_MySQL->query( ).../DatabaseHandler.php:119
40.06202721672Database_MySQL->error( ).../Db-mysql.class.php:273