<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8890668628486335410</id><updated>2012-02-17T01:22:27.475+01:00</updated><category term='matlab'/><category term='web'/><category term='ascii'/><category term='vhdl'/><category term='binary'/><category term='perl'/><title type='text'>DevBlogEN</title><subtitle type='html'>My developpement blog in english. I try to put everything i'm working on from Web to hardware programming.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://tezan2.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://tezan2.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/00630894512413946639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8890668628486335410.post-3092923527436178999</id><published>2007-09-25T15:59:00.000+02:00</published><updated>2008-01-11T15:41:10.599+01:00</updated><title type='text'>Serial soft interface in VC++ using System.IO.Ports.SerialPort .net object</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.compress.ru/Archive/CP/2005/6/51/Visual-Studio-2005-logo-v.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 200px;" src="http://www.compress.ru/Archive/CP/2005/6/51/Visual-Studio-2005-logo-v.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;My aim is to build a small GUI-programme able to read and to write strings on the COM port. This stuff is a good way to get familiar with Visual Studio to build graphical user interface and with the .Net object System.IO.Ports.SerialPort. This s&lt;/span&gt;&lt;span style="font-family:arial;"&gt;mall piece of code is based on :&lt;/span&gt; &lt;span style="font-family:arial;"&gt;   &lt;/span&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:arial;"&gt;    - System.IO.Ports.SerialPort.Open();&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:arial;"&gt;- System.IO.Ports.SerialPort.Close();&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:arial;"&gt;- System.IO.Ports.SerialPort.ReadLine();&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:arial;"&gt;- System.IO.Ports.SerialPort.WriteLine().&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://bp1.blogger.com/_AKy0iW3F2V8/RvkkmNe6c6I/AAAAAAAAANU/5v4C7U2LYdg/s1600-h/AccesPortCOM.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://bp1.blogger.com/_AKy0iW3F2V8/RvkkmNe6c6I/AAAAAAAAANU/5v4C7U2LYdg/s400/AccesPortCOM.jpg" alt="" id="BLOGGER_PHOTO_ID_5114159090728858530" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;The graphical quite minimalist :&lt;/span&gt; &lt;span style="font-family:arial;"&gt;    a textbox to get the string to write on the serial connection from the user,&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:arial;"&gt;3 buttons :&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family:arial;"&gt;- to open/close the COM port, &lt;/span&gt; &lt;span style="font-family:arial;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        - to write on the COM port,&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family:arial;"&gt;- to read on the COM port,&lt;/span&gt;&lt;br /&gt; &lt;span style="font-family:arial;"&gt;3 label :&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family:arial;"&gt;- to retrieve the string red on the COM port,&lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family:arial;"&gt;- to retrieve the string written on the COM port,&lt;/span&gt; &lt;span style="font-family:arial;"&gt;        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;        - to retrieve port COM status (open/close).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;    AccesPortCOM (name of the programme) is really basic and easy to use. When you start it the COM port is closed. Just click on "Ouvrir" to open the connection. The port COM status label displays "Port COM ouvert". &lt;/span&gt; &lt;span style="font-family:arial;"&gt;Type "une chaine" in the textbox and click on "ecrire". The write status label displays "écriture de une chaine sur le port COM...". If the textbox is empty the write status label displays "(rien à écrire)".&lt;/span&gt; &lt;span style="font-family:arial;"&gt;Click on "lire" to read the reception buffer. If the reception buffer is empty, the write status label displays "lecture port COM impossible" and read status displays "(tampon RX vide)".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:arial;"&gt;Note : the computer I'm using at the moment offers only one COM port, thus the programme is build to run on the COM1 port. It's not really generic but it works and that's enough to test System.IO.Ports.SerialPort :) ...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the code :&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;/// Procédures gérant la laison série&lt;br /&gt; /// Ouverture du port COM&lt;br /&gt; void OpenPortCom(void){&lt;br /&gt;  try{&lt;br /&gt;   this-&gt;serialPort1-&gt;Open();&lt;br /&gt;   this-&gt;label1-&gt;Text= "Port COM ouvert";&lt;br /&gt;   }&lt;br /&gt;  catch(...){&lt;br /&gt;   this-&gt;label1-&gt;Text= "ouverture port COM impossible";  &lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; ///Fermeture du port COM&lt;br /&gt; void ClosePortCom(void){&lt;br /&gt;  try{&lt;br /&gt;   this-&gt;serialPort1-&gt;Close();&lt;br /&gt;   this-&gt;label1-&gt;Text= "Port COM fermé";&lt;br /&gt;   }&lt;br /&gt;  catch(...){&lt;br /&gt;   this-&gt;label1-&gt;Text= "fermeture port COM impossible";  &lt;br /&gt;   }&lt;br /&gt; }&lt;br /&gt; &lt;br /&gt; ///Lecture sur le port COM&lt;br /&gt; void ReadPortCom(void){&lt;br /&gt;  try{&lt;br /&gt;   this-&gt;valeurLue = this-&gt;serialPort1-&gt;ReadLine();&lt;br /&gt;   this-&gt;label-&gt;Text= "lecture du port COM...";&lt;br /&gt;   }&lt;br /&gt;  catch(...){&lt;br /&gt;   this-&gt;label-&gt;Text= "lecture port COM impossible";  &lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt; ///Ecriture sur le port COM&lt;br /&gt; void WritePortCom(void){&lt;br /&gt;  try{&lt;br /&gt;   if (this-&gt;valeurEcrite!=""){&lt;br /&gt;    this-&gt;serialPort1-&gt;WriteLine(valeurEcrite);&lt;br /&gt;    this-&gt;label-&gt;Text= "écriture de " + this-&gt;valeurEcrite +" sur le port COM...";&lt;br /&gt;    }&lt;br /&gt;   else {&lt;br /&gt;    this-&gt;label-&gt;Text= "(rien à écrire)";&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;  catch(...){&lt;br /&gt;   this-&gt;label-&gt;Text= "écriture port COM impossible";  &lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; &lt;br /&gt;private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {&lt;br /&gt;    this-&gt;valeurEcrite = this-&gt;txtBoxEcriture-&gt;Text;&lt;br /&gt;    this-&gt;label-&gt;Text = "";&lt;br /&gt;    this-&gt;labelLecture-&gt;Text = "";&lt;br /&gt;    WritePortCom();&lt;br /&gt;    this-&gt;txtBoxEcriture-&gt;Text ="";&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;private: System::Void button2_Click(System::Object^  sender, System::EventArgs^  e) {&lt;br /&gt;    this-&gt;label-&gt;Text = "";&lt;br /&gt;    ReadPortCom();&lt;br /&gt;    try{&lt;br /&gt;    this-&gt;labelLecture-&gt;Text = this-&gt;valeurLue-&gt;ToString();&lt;br /&gt;    }&lt;br /&gt;    catch(...){&lt;br /&gt;     this-&gt;labelLecture-&gt;Text = "(tampon RX vide)";&lt;br /&gt;    }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;private: System::Void button3_Click(System::Object^  sender, System::EventArgs^  e) {&lt;br /&gt;    if (this-&gt;ouvert==false){&lt;br /&gt;     this-&gt;button3-&gt;Text = "fermer";&lt;br /&gt;     OpenPortCom();&lt;br /&gt;     this-&gt;ouvert=true;&lt;br /&gt;     }&lt;br /&gt;    else if (this-&gt;ouvert==true){&lt;br /&gt;     this-&gt;button3-&gt;Text = "ouvrir";&lt;br /&gt;     ClosePortCom();&lt;br /&gt;     this-&gt;label-&gt;Text = "";&lt;br /&gt;     this-&gt;labelLecture-&gt;Text = "";&lt;br /&gt;     this-&gt;txtBoxEcriture-&gt;Text ="";&lt;br /&gt;     this-&gt;ouvert=false;&lt;br /&gt;&lt;br /&gt;     }&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;private: System::Void panel1_Paint(System::Object^  sender, System::Windows::Forms::PaintEventArgs^  e) {&lt;br /&gt;   }&lt;br /&gt;};&lt;br /&gt;} &lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;&lt;code&gt;&lt;/code&gt;&lt;/span&gt; &lt;span style="font-family:arial;"&gt;    &lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8890668628486335410-3092923527436178999?l=tezan2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tezan2.blogspot.com/feeds/3092923527436178999/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8890668628486335410&amp;postID=3092923527436178999' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/3092923527436178999'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/3092923527436178999'/><link rel='alternate' type='text/html' href='http://tezan2.blogspot.com/2007/09/serial-soft-interface-in-vc-using.html' title='Serial soft interface in VC++ using System.IO.Ports.SerialPort .net object'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/00630894512413946639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_AKy0iW3F2V8/RvkkmNe6c6I/AAAAAAAAANU/5v4C7U2LYdg/s72-c/AccesPortCOM.jpg' height='72' width='72'/><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8890668628486335410.post-3023064121682625384</id><published>2007-08-08T15:23:00.001+02:00</published><updated>2007-08-08T17:18:30.952+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='binary'/><category scheme='http://www.blogger.com/atom/ns#' term='ascii'/><category scheme='http://www.blogger.com/atom/ns#' term='matlab'/><category scheme='http://www.blogger.com/atom/ns#' term='vhdl'/><title type='text'>Using Matlab to generate a VHDL ASCII to Binary transcoder</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://tbn0.google.com/images?q=tbn:luK1qGow7LqmwM:http://keith.hostmatrix.org/testbed/wp-content/uploads/2006/07/matlab_logo.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 127px; height: 95px;" src="http://tbn0.google.com/images?q=tbn:luK1qGow7LqmwM:http://keith.hostmatrix.org/testbed/wp-content/uploads/2006/07/matlab_logo.gif" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family:arial;"&gt;ASCII character aren't so easy to manipulate in VHDL. In fact I started to use it as a native type of VHDL but in using QUARTUS VHDL compiler we can't output character. We can't build entity with "complex type" outputs or inputs.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;I try to cast "character"  to "std_logic_vector" but we can't do it with "std_logic_1164.all", "std_logic_unsigned.all", "std_logic_arith.all" and "numeric_std.all" ieee library.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;I saw &lt;/span&gt;&lt;a style="font-family: arial;" href="http://groups.google.de/group/comp.lang.vhdl/msg/599f65d974006f62?q=Ralf+Hildebrandt+Hex&amp;hl=de&amp;amp;amp;amp;amp;amp;amp;lr=&amp;ie=UTF-8&amp;amp;rnum=2"&gt;this '&lt;span class="fixed_width"&gt;quick&amp;very dirty way' &lt;/span&gt;solution&lt;/a&gt;&lt;span style="font-family:arial;"&gt; wich enable to create you own library. I find the idea good but the code is limited to a small amount of characters and its quite tiresome to add the other characters.&lt;/span&gt;  &lt;span style="font-family:arial;"&gt;&lt;br /&gt;&lt;br /&gt;Here is a small Matlab script to generate  the "case" structure with the whole ASCII characters.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;FileID = fopen('transcoderASCII2Binary.h','w');&lt;br /&gt;&lt;br /&gt;fprintf(FileID, '\t\tcase char is\n');&lt;br /&gt;&lt;br /&gt;for i=32:127  &lt;br /&gt;  fprintf(FileID, '\t\t when ''%s''=&gt; \n\t\t\t data &lt;= "%s"; \n',char(i), dec2bin(i,8)); end  fprintf(FileID, '\t\t when others =&gt; \n\t\t\t data &lt;= "00000000"; \n'); fprintf(FileID, 'end case;');  fclose(FileID);   &lt;span style="font-family:arial;"&gt;And here is the result :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;       case char is&lt;br /&gt;        when ' '=&gt;&lt;br /&gt;            data &lt;= "00100000";         &lt;br /&gt;when '!'=&gt;&lt;br /&gt;            data &lt;= "00100001";         &lt;br /&gt;when '"'=&gt;&lt;br /&gt;            data &lt;= "00100010";         &lt;br /&gt;when '#'=&gt;&lt;br /&gt;            data &lt;= "00100011";         &lt;br /&gt;when '$'=&gt;&lt;br /&gt;            data &lt;= "00100100";         &lt;br /&gt;[............]           &lt;br /&gt;when '~'=&gt;&lt;br /&gt;            data &lt;= "01111110";         &lt;br /&gt;when ''=&gt;&lt;br /&gt;            data &lt;= "01111111";         &lt;br /&gt;when others =&gt;&lt;br /&gt;            data &lt;= "00000000";&lt;br /&gt;end case;  &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8890668628486335410-3023064121682625384?l=tezan2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tezan2.blogspot.com/feeds/3023064121682625384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8890668628486335410&amp;postID=3023064121682625384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/3023064121682625384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/3023064121682625384'/><link rel='alternate' type='text/html' href='http://tezan2.blogspot.com/2007/08/using-matlab-to-generate-vhdl-ascii-to.html' title='Using Matlab to generate a VHDL ASCII to Binary transcoder'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/00630894512413946639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8890668628486335410.post-7172400125015494489</id><published>2007-06-19T23:00:00.000+02:00</published><updated>2007-06-20T00:24:16.486+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='perl'/><category scheme='http://www.blogger.com/atom/ns#' term='web'/><title type='text'>Script in perl to generate content</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.mileslight.com/images/perl-camel.gif"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 98px; height: 89px;" src="http://www.mileslight.com/images/perl-camel.gif" alt="" border="0" /&gt;&lt;/a&gt;I'm new to perl and i'm trying to get used with it in wrinting a tiny script wich will help me to translate some article for &lt;a href="http://aving.net/"&gt;aving.net&lt;/a&gt; in french. I just have to put information in the form and then clicking on write, and the script give the title, a summary and the content of the article.&lt;br /&gt;&lt;br /&gt;For now it's quite simple, and it always give you back the same kind of article. But latter we can imagine to give the script several tamplates of articles and letting him chose randomly bettween those tamplates.&lt;br /&gt;&lt;br /&gt;Anyways, it's a nice application to get familiar with perl.&lt;br /&gt; &lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;br&gt;&lt;br /&gt;&lt;object width="600" height="500"&gt;&lt;param name="allowScriptAccess" value="SameDomain" /&gt;&lt;param name="movie" value="http://static.scribd.com/FlashPaperS3.swf?guid=e8tnhe376djp9&amp;document_id=121902&amp;page=1" /&gt;&lt;embed width="600" height="500" src="http://static.scribd.com/FlashPaperS3.swf?guid=e8tnhe376djp9&amp;document_id=121902&amp;page=1" type="application/x-shockwave-flash"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;object width="500" height="500"&gt;&lt;param name="allowScriptAccess" value="SameDomain" /&gt;&lt;param name="movie" value="http://static.scribd.com/FlashPaperS3.swf?guid=5slwqu6mtgy0o&amp;document_id=121924&amp;page=1" /&gt;&lt;embed width="500" height="500" src="http://static.scribd.com/FlashPaperS3.swf?guid=5slwqu6mtgy0o&amp;document_id=121924&amp;page=1" type="application/x-shockwave-flash"&gt;&lt;/embed&gt; &lt;/object&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8890668628486335410-7172400125015494489?l=tezan2.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://tezan2.blogspot.com/feeds/7172400125015494489/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8890668628486335410&amp;postID=7172400125015494489' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/7172400125015494489'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8890668628486335410/posts/default/7172400125015494489'/><link rel='alternate' type='text/html' href='http://tezan2.blogspot.com/2007/06/script-in-perl-to-generate-content.html' title='Script in perl to generate content'/><author><name>Thomas</name><uri>http://www.blogger.com/profile/00630894512413946639</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
