PIC related website

General discussion on mikroPascal PRO for PIC.
Post Reply
Author
Message
chimimic
Posts: 178
Joined: 29 Sep 2007 14:35
Location: France
Contact:

#92 Post by chimimic » 07 Feb 2009 20:59

Hi Dany,

I just finished a thermostat where I use your DS1820 library, and all works very well :D

Thermostat 001 with DS1820

No use of LCD, as this thermostat is used with a fixed temp, that can be configured by microswiches.

A big thanks for your work !

Best regards,
Remy
Last edited by chimimic on 09 Feb 2009 09:03, edited 1 time in total.

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#93 Post by Dany » 08 Feb 2009 11:08

chimimic wrote:I just finished a thermostat where I use your DS1820 library, and all works very well :D

Thermostat 001 with DS1820

No use of LCD, as this thermostat is used with a fixed temp, that can be configured by microswiches.
Very nice! :D
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

chimimic
Posts: 178
Joined: 29 Sep 2007 14:35
Location: France
Contact:

#94 Post by chimimic » 08 Feb 2009 12:06

Thanks Dany.

I have to say I'm not a newbie in electronic, but I'm really a newbie in PIC developpement (I work on it since one year), and your site is a very usefull base : exemples are well described, and understand them is easy. Sure I visit it on a regular basis.

Thanks again for sharing your knowledge as you do.

Remy

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#95 Post by Dany » 09 Feb 2009 14:02

Hi all,

[edit 27/2/2009]In the mean time (see three postes further) the routine "LCD1602Reset" mentioned here has been integrated into the "LCD1602Init" one, and can not be called separately any more. Reason: after "LCD1602Reset", always "LCD1602Init" has to be called".[/edit]

To unit "LCD1602_4bits.ppas" a routine "LCD1602Reset" has been added, which (as the name suggests) does a reset of the LCD. It does this by switching off the LCD power supply and switching it on again. This action will reset the processor on the LCD board.

The reason for this is that sometimes the PIC driving the LCD is reset for some reason (e.g. Vcc spike), and the PIC software restarts, but the LCD software is not restarted, resulting in a non defined situation (bad LCD display).

Anyway, if you want to use it, the routine "LCD1602Reset" should (of course) be called before "LCD1602Init".

Additionally, since the LCD board's Vcc has to be switched now, some extra electronic parts (3) are needed: one transistor (e.g. type bc557 or equivalent) and 2 resistors of 1k. The circuit diagram is:
http://www.rosseeld.be/DRO/PIC/LCD_Conn ... _reset.gif
Last edited by Dany on 27 Oct 2010 09:43, edited 3 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#96 Post by Dany » 15 Feb 2009 19:00

Hi all, a new unit (or library if you wish) has been added to the website with URL below (section "Units"):
Rc5_Decoder.mpas (http://www.rosseeld.be/DRO/PIC/Rc5_Decoder.mpas).

Description:
RC5 (Philips IR remote control system) decoder, decodes the Rc5 toggle, Rc5 System and Rc5 command. For 36 kHz IR receivers with inverse output (no RC5 signal = "high"). Usage example: Rc5_test.mpas (http://www.rosseeld.be/DRO/PIC/Rc5_test_PRO.zip).
The decoder is interrupt based (the external interrupt is used) and uses timer 0. The current software is tuned to a CPU clock of 4 Mhz. For other clock speeds adaptations are needed (see text in the unit).

Details about RC5: http://www.sbprojects.com/knowledge/ir/rc5.htm

Have fun! :D
Last edited by Dany on 04 Apr 2011 10:40, edited 4 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

chimimic
Posts: 178
Joined: 29 Sep 2007 14:35
Location: France
Contact:

#97 Post by chimimic » 16 Feb 2009 09:13

Hi Dany,

Wow, I just search infos about RC5 frames to implement this on some of my multicolors luminars.

Sure this library would be useful.
Thanks a lot for this !

Remy

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#98 Post by Dany » 18 Feb 2009 16:26

Hi all,
The unit "LCD1602_4bits.mpas" (http://www.rosseeld.be/DRO/PIC/LCD1602_4bits.mpas) has been adapted to be able to use a different port then PortB. Now a parameter has to be provided with "LCD1602Init":

Code: Select all

procedure LCD1602Init(var LCDPrt: byte);
// LCD initialization routine //
// Resets and initializes the LCD to 4 bit mode, 2 rows, cursor off
// The entire port "LCDPrt" will be used for the LCD, except bit 0
Also the "LCD1602Reset" routine is deleted. The reset function (via Portx.1) is now integrated into "LCD1602Init".

Only Portx.0 is not used by the LCD now. :D

Enjoy. :D
Last edited by Dany on 04 Apr 2011 10:38, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#99 Post by Dany » 26 Feb 2009 20:10

Hi all,
Just added a circuit diagram for an RS232 <-> PIC interface. See http://www.rosseeld.be/DRO/PIC/Max232Rep.GIF. It can also be found on the website below in section "Tips".

It only provides for the RX and the TX lines, not the RTS and CTS ones. Usually the latter two are not used anyway. Of course, "doubling" the interface gives you control over all 4 lines.

The positive rs232 voltage out of this interface is only 5V (in stead of >= 10V), but most PC's don't mind about that.
The interface is tested to a speed of 115200 bits/sec, and performing well.

The reason for me to build and use this interface in stead of the max232 is that my max232 showed a very strange faulty behaviour, very difficult to detect. See http://www.mikroe.com/forum/viewtopic.php?t=18546.

Have fun! :D
Last edited by Dany on 27 Oct 2010 09:45, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#100 Post by Dany » 03 Mar 2009 19:00

Hi,
I added a small article about Ethernet:
http://www.rosseeld.be/DRO/PIC/Ethernet.htm. It contains something about the possible hardware configurations and the available software libraries. Additionally some tips are included.
Can be usefull for beginners with PICs & Ethernet.

The scope of the document is providing some high level information and tips to people that just start with PIC Ethernet access (like I did a few months ago).

The purpose of the document is not to explain the Ethernet details (like HTTP, TCP/IP), nor the details of the several software libraries providing Ethernet access to PIC's, nor the internals of the hardware capable of handling Ethernet.
For this information you will have to look into the relevant literature and the relevant datasheets, find the relevant forum threads, look into code examples/snippets or contact the software library authors.

Have fun. :D
Last edited by Dany on 27 Oct 2010 09:45, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#101 Post by Dany » 11 Mar 2009 21:49

Hi, the unit (library) RC5_decoder.ppas has been adapted: the routine "GetRc5" has become much more simple, smaller and faster. I do not know what I was thinking when making it so complicated... :oops:
Link: http://www.rosseeld.be/DRO/PIC/Rc5_Decoder.ppas
Last edited by Dany on 27 Oct 2010 09:46, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#102 Post by Dany » 12 Mar 2009 13:36

Hi, just started with mikroPascal PRO and made for myself a small list of things to do to make an existing mP project work under mikroPascal PRO.
Here it is: http://www.rosseeld.be/DRO/PIC/PRO%20Quick%20Start.htm

Have fun with PRO! :D :D
Last edited by Dany on 27 Oct 2010 09:46, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

joseLB
Posts: 444
Joined: 02 Apr 2006 05:56
Location: Riode Janeiro, Brasil

RS232 circuit withou max232

#103 Post by joseLB » 16 Mar 2009 02:51

Dany wrote:Hi all,
Just added a circuit diagram for an RS232 <-> PIC interface. See http://users.edpnet.be/rosseel01/DRO/PIC/Max232Rep.GIF. It can also be found on the website below in section "Tips".
Hi Danny, very clever your circuit, congratulations. You used the "-" suplied in pin 3 from PC to load the capacitor with a negative voltage, so the needed "-", for the Tx when it's iddle or transmiting logic 0, will exists.
How did you found the 47uF, 100 ohms, 1K values? Experimentation?
Jose

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

Re: RS232 circuit withou max232

#104 Post by Dany » 16 Mar 2009 09:03

joseLB wrote:
Dany wrote:Hi all,
Just added a circuit diagram for an RS232 <-> PIC interface. See http://www.rosseeld.be/DRO/PIC/Max232Rep.GIF. It can also be found on the website below in section "Tips".
Hi Danny, very clever your circuit, congratulations. You used the "-" suplied in pin 3 from PC to load the capacitor with a negative voltage, so the needed "-", for the Tx when it's iddle or transmiting logic 0, will exists.
Jose
Thanks, but I am sure it is not my invention, and others have already (long time ago) presented something like this. Unfortunately I could not find back some of those circuit diagrams...
joseLB wrote:How did you found the 47uF, 100 ohms, 1K values? Experimentation?
No. Experience (I was an electronics designer) and measurement of the rise and fall times of signals at 115200 baud for the 1K. :D
Last edited by Dany on 27 Oct 2010 09:46, edited 1 time in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#105 Post by Dany » 18 Mar 2009 19:42

Hi, I added the "PRO" version on the website for most of the available units, see section "Units" on the website with the URL at the bottom of this post.

Have fun! :D

p.s. when starting with PRO, do not forget to read this:
http://www.rosseeld.be/DRO/PIC/PRO%20Quick%20Start.htm (it can save you a lot of trouble...)
Last edited by Dany on 27 Oct 2010 09:47, edited 2 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Dany
Posts: 3854
Joined: 18 Jun 2008 11:43
Location: Nieuwpoort, Belgium
Contact:

#106 Post by Dany » 21 Mar 2009 13:22

Hi all,
just added a new "project" to the website: TelnetToRs232. See section "PIC Projects" on the website with URL at the bottom.

This project/device (hard- and software) can be used to control up to 6 RS232 devices via Telnet (Ethernet).
The different RS232 ports are accessed via different Telnet ports, e.g. telnet port 2301 connects with RS232 port 1, telnet port 2302 connects with RS232 port 2 etc..., upto telnet port 2306.
Only one RS232 port is active at each moment: the last one communicated to via a telnet port. The reason for this is that the PIC has only one usart on board, so switching is necessary. This switching to the correct RS232 port happens automatically when data is received from a certain telnet port.
The software sends all telnet (ports 23xx) data received (except telnet command sequences) to the corresponding RS232 port and vice versa.
The "control" port, via which one can see the status, change the RS232 baudrate etc..., is telnet port 2323. "?" shows the control commands that can be used (**). There is a simple command "editor" added, see http://www.mikroe.com/forum/viewtopic.p ... &start=136.
To each RS232 port a baudrate and a name can be given.
Uses the Ethernet ENC library v3_5 from Yo2Lio (Thanks Florin).

(**) help content:
Commands:
? = help
stat = show status
show = show all interfaces
int=x = select interface x (x=0..6)
baud=x = set baudRate to x (x = 9[600], 3[8400], 5[7600], 1[15200])
name=xxx = set name to xxx (max 30 chars)

Editor Cmds:
Control A = beginning of line
Control E = end of line
Control C = erase line
Backspace = delete previous character
Delete = delete character
Up arrow = previous command
Down arrow = next command
Left arrow = previous character
Right arrow = next character
Character = insert character
Last edited by Dany on 01 May 2009 13:29, edited 6 times in total.
Kind regards, Dany.
Forget your perfect offering. There is a crack in everything, that's how the light gets in... (L. Cohen)
Remember when we were young? We shone like the sun. (David Gilmour)

Post Reply

Return to “mikroPascal PRO for PIC General”