HTML with MCU's?

MrChips

Joined Oct 2, 2009
30,714
Man, you're really confuse.

Front Page has nothing to do with it. You can create a web page with any word processor.
Front Page is just a program much like a word processor such as MS Word, NotePad or WordPad.

A web page is a text file much like a file created by a word processor.
This file contains a long list of instructions that describes how the page is supposed to appear on the screen. You can read this text file in plain English. These instructions follow a set of rules that we call HTML (HyperText Markup Language). Just think of it as a text file. Web page names have an extension .htm or .html instead of .txt

You can go to your computer and look for any file with the extension .htm or .html
Right click on the filename and Open with... Wordpad.

When you visit a website, this text file is transferred to your computer (or handheld device).

In your computer is a program that follows the instructions in this text file and displays information on the screen. This program is the secret. It is called a web browser (or web page interpreter). Internet Explorer, Firefox, Chrome, Safari etc. are all web browsers.

So a web browser is all you need in a device in order to display a web page.
 
Last edited:

Thread Starter

rougie

Joined Dec 11, 2006
410
>Man, you're really confuse.

And now you know!

Okay all you said, I get it... Probably not as well as you do, but I get the gist of it.

However when speaking about MCU's, when someone accesses my web page that resides in my MCU through a web browser like safari, according to what you say, the HTML code in my MCU is transferred to the smart phone so safari can read it right?

In my MCU where is this file stored? I can only compile C language and not HTML???

I see how an HTML file can be transferred from a web server PC to another PC. This is because I know the web server PC has the HTML code on its hard drive. But what I don't get is how could a HTML file be transferred from an MCU web server to another PC when all my code *IN* my MCU is "C".

In other words this HTML code that is responsible for showing buttons, title bars, bold characters and many more objects in different colors on another PC half way around the world... where does it reside in a PIC32?

r
 

MrChips

Joined Oct 2, 2009
30,714
Remember, a web page is just a text file. Your C compiler does not have to do anything with it.

So the web page (or text file) is just a long string of char or byte.
It gets stored into the MCU's flash memory just like plain data, the same way you would store "Hello World" in a computer memory.
 

Thread Starter

rougie

Joined Dec 11, 2006
410
Remember, a web page is just a text file. Your C compiler does not have to do anything with it.

So the web page (or text file) is just a long string of char or byte.
It gets stored into the MCU's flash memory just like plain data, the same way you would store "Hello World" in a computer memory.
Haaaaaaa! So the Ethernet library in my kit contains the HTML file in the form of chars which when downloaded on a smart phone and interpreted by safari we get the web site to display. Now I get it.

If one knows HTML, would it be wise to modify the HTML codes ? Or suppose we wanted our own web page... can we create it from scratch in front page or word processor and then store the HTML code in MCU?


Also...... In one of the library files of my Ethernet demo I found a file that contains the following:

===================================
<?xml version="1.0"?>
<MCU_DEVICE_FLAGS>
<DEVICE>
<DEVICE_NAME>P32MX795F512L</DEVICE_NAME>
<VALUE>
<COUNT>4</COUNT>
<VALUE0>
<VAL>$1FC02FF0:$C4070000</VAL>
</VALUE0>
<VALUE1>
<VAL>$1FC02FF4:$0151</VAL>
</VALUE1>
<VALUE2>
<VAL>$1FC02FF8:$14C503</VAL>
</VALUE2>
<VALUE3>
<VAL>$1FC02FFC:$110FF00F</VAL>
</VALUE3>
</VALUE>
</DEVICE>
</MCU_DEVICE_FLAGS>
==================================

Is this HTML?

r
 
Last edited:

kubeek

Joined Sep 20, 2005
5,794
No, that is XML. If i am correct XML is very similar to HTML in the way it looks and uses the tags.
The difference is that XML is used as a "database" and the tags can be anything you want, unlike HTML where the tags are already defined and to get a proper web page you need to use them as they were meant to.
 

nsaspook

Joined Aug 27, 2009
13,087
So where does HTML/Front page tie into all this????
Is HTML somewhere in my MCU???? if so it must be in the Ethernet library which makes no sense because my compiler compiles only C language and not HTML???

Confused!

R
Microchip has a utility that can convert HTML text files into a .bin file to be linked into your application so it can read the HTML files directly from flash.
http://know.plugandprogram.com/index.php?title=Interaction_between_HTTP2_server_&_MPFS2_filesystem
 
Top