Picaxe.Net refresh

Ive been playing with my Picaxe.net kit and learning about HTML etc. I noticed that some of demos periodically refresh the webpage every 3 seconds or so. I wondered if there was a way I could change the refresh rate or whether that was coded into the firmware on the 18F4552 chip?
 

Technical

Technical Support
Staff member
The refresh is actually done by the web page, so is easy to change. Have a look at the top of the .cgi sample files - you will see refresh=3 at the top of many of them.

Simply change 3 to another number and download the new pages into the PNS to change the refresh rate!
 
Thankyou, the board looks like it has a lot of potential. I presume the actual TCP/IP aspect has to be dealt with by programming the 18F4552?
 

Technical

Technical Support
Staff member
TCP IP is already done for you, as the PIC on the PNS is preprogrammed alreday - ie you do not worry about any of the complex stuff! Have a read through the NET001 datasheet.
 
Thankyou, I wonder if maybe Im getting the wrong end of the stick? The HTML bit seems pretty good, but Im trying to do something slightly different. Or perhpas Im misunderstanding the whole thing.

Im trying to set it up so that if I send a byte of data to my .net board using TCP/IP from a PC , the picaxe.net server can respond by sending a byte of data back in response. Its not so clear in the data sheet how this can be accomplished. Im thinking along the lines of something like SERIN/SEROUT but with TCP/IP instead of 232.
 

Technical

Technical Support
Staff member
You do this by getting the PC to issue a 'GET' command to return the PNS variable value of interest. Have a look at the PNS wizards (PICAXE>Wizards menu of thr Prog Editor)- the 'get wizard' illustrates this process.

So you write a very simple PC software application that issues a 'get' command and parses the reply to extract the data value. This is atually much easier than working at the TCP/IP level!
 

hippy

Ex-Staff (retired)
Unfortunately there is no way to just open a TCP/IP port ( as one might with Telnet ) and stream data to it which is automatically sent out the PICAXE.Net's serial port with received serial data from the PICAXE returned back.

You can send bytes of data embedded in a HTTP request which can then be accessed by an attached PICAXE and you can read data returned by the PICAXE in the same way.

Communications of this type is through the shared I2C buffer. On one side you can read and write the buffer using HTTP requests, on the other, the PICAXE can read and write data values using I2C commands.

You can potentially rewrite the PICAXE.Net Firmware to do what you need, but that is a considerable task and likely beyond most people's experience and skills.

An alternative would be to look at commercial products which are simpler TCP/IP to Serial bridges, Sena's NEMO10 and others.
 
Thankyou Hippy but Technical give the answer closest to what I was getting at. Im quite at home with assembly language C++ and all the rest of it. I really wasnt talking about RS232 to TCP/IP conversion because I would have just written a winsock program on my PC.
I think I'll have a go at parsing data out with the Get command
 
Top