Additional library for MikroPascal PRO 2009

General discussion on mikroPascal PRO for PIC.
Author
Message
yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

Re: Additional library for MikroPascal PRO 2009

#46 Post by yo2lio » 11 Jun 2010 21:52

szabi wrote: I've installed your v1.4 library pack, but in the library manager nothing appears. I have MikroPascal PRO 2.5 (also tried on v3.8 )
(The components were succesfully extracted into the uses\p18 folder by the way)
Can you please tell me what should I do?
Hi,

Do nothing, the library will not appear in library manager, the pack just put the library files in USES folder.
To use libraries, you must include this files at the beginning of program/units.

For example:

Code: Select all

uses pic_additional_string_library,Lib_Delays_LIO,lib1_18F97J60_V3_5,eth_lib_user,
     lib2_18F97J60_V3_5,def_io;
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

szabi
Posts: 9
Joined: 23 Jun 2007 19:46

Re: Additional library for MikroPascal PRO 2009

#47 Post by szabi » 12 Jun 2010 09:57

Thanks Florin! :D

ambroise
Posts: 5
Joined: 11 Jul 2010 17:20

Re: Additional library for MikroPascal PRO 2009

#48 Post by ambroise » 11 Jul 2010 17:41

Hello,

first of all , thank you for those libraries.

I use the sensirion one with MP pro with a 18F4550.

8 sht75 are to be read one at a time, and then again every 15 minutes.

I use PORTE.0 as common SCLK for all 8 SHT.
PORTB.0 to 7 as power supply for each sensor ( one at a time )
PORTD.0 to 7 as SDA ( also one at a time )

Well, i've got a problem with var definitions SHTxx_SDA and SHTxx_SDA_dir.

How to change SHTxx_SDA : sbit at PORTD.0 to SHTxx_SDA : sbit at PORTD.1 within the main loop ?

sensirion_init doesn't seem to accept any parameters .

is it an easy way to solve it ?

I hate multiplexing :mrgreen:

any clues are welcome.

thank you.

Ambroise

juanelectro
Posts: 47
Joined: 24 Oct 2009 16:01
Location: Colombia

Re: Additional library for MikroPascal PRO 2009

#49 Post by juanelectro » 22 Jul 2010 14:31

Good day,

I have a question, I can configurate 2 gateways and 2 DNS for sending information to 2 servers?

Thanks for attention.

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

Re: Additional library for MikroPascal PRO 2009

#50 Post by yo2lio » 22 Jul 2010 14:37

Hello,

If you want, you can change GATEWAY and DNS on the fly... will works.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

juanelectro
Posts: 47
Joined: 24 Oct 2009 16:01
Location: Colombia

Re: Additional library for MikroPascal PRO 2009

#51 Post by juanelectro » 27 Jul 2010 20:58

Thanks yo2lio

mjoco
Posts: 13
Joined: 06 Apr 2010 16:36

Difference between units

#52 Post by mjoco » 26 Aug 2010 15:35

Hello
What is the difference between the sdmmc_spi1 and the sdmmc_spi2 unit (fat32_spi1 and fat32_spi2)?
Thanks

yo2lio
Posts: 1878
Joined: 19 Sep 2006 12:57
Location: Romania, Arad City
Contact:

Re: Difference between units

#53 Post by yo2lio » 29 Aug 2010 14:43

mjoco wrote:Hello
What is the difference between the sdmmc_spi1 and the sdmmc_spi2 unit (fat32_spi1 and fat32_spi2)?
Thanks
sdmmc_spi1 are for hardware SPI1 module and sdmmc_spi2 are for hardware SPI2 module.
Best regards, Florin Andrei Medrea.

http://www.microelemente.ro/
http://www.microelemente.ro/produse-si-servicii/
http://www.microelemente.ro/custom-software/

mail : florin@microelemente.ro

javor.pas
Posts: 98
Joined: 16 Mar 2007 11:25
Contact:

Re: Additional library for MikroPascal PRO 2009

#54 Post by javor.pas » 13 Sep 2010 11:52

Thank you Florin for the library. I've just started using it and found something that may be useful:
You have to call several Str2Ip(...) prior to calling Eth_SetParameters to set the Ethernet parameters. However in most cases IP, Gateway, MAC, Mask (at least in my case) are written as separate bytes in a flash. So I have to turn those bytes to strings and then call Str2Ip... I think it will be useful to have a function prototype like SetIP(IP : array[4] of byte) or SetIP(IP0, IP1, IP2, IP3 : byte) and so on with other parameters. I think you parse those strings and set the IP when calling Str2Ip.
All this is just a suggestion.

Kind regards,

javor.pas
I sit and think, sit and think... and some time I notice I only sit :)

mjoco
Posts: 13
Joined: 06 Apr 2010 16:36

Re: Additional library for MikroPascal PRO 2009

#55 Post by mjoco » 07 Jan 2011 19:20

Hi,

i use YO2LIO's ENC_V3_5 library. I would like to ask what starts the data sending when i use the tcp/ip stack?
I wanna send to the http client (web browser) many packets, not only one.
Thanks.

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

Re: Additional library for MikroPascal PRO 2009

#56 Post by Dany » 12 Jan 2011 11:30

mjoco wrote:Hi,

i use YO2LIO's ENC_V3_5 library. I would like to ask what starts the data sending when i use the tcp/ip stack?
I wanna send to the http client (web browser) many packets, not only one.
Thanks.
Hi, please see http://www.rosseeld.be/DRO/PIC/index.htm#PIC_Projects, project "HTTP File Server (for Fat32 sd/mmc cards)", file "HTTP_Server_Fat32.mpas", routine "SendData". This shows the method I use in my projects, it is for sending files to the browser, perhaps you do not need all the code.

Basically one sends data by setting

Code: Select all

Socket[Sock].RAM_ROM := 0; // ram
Socket[Sock].Start_addr := ...
Socket[Sock].Stop_addr := ...
after filling of course the buffer pointed to.
It may be necessary to do also

Code: Select all

Socket[Sock].Keep_Alive := true; if more data is to be sent and
Socket[Sock].Keep_Alive :=false; if the last block has been sent.
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)

mjoco
Posts: 13
Joined: 06 Apr 2010 16:36

Re: Additional library for MikroPascal PRO 2009

#57 Post by mjoco » 15 Jan 2011 22:36

Hi Dany!
Thank you for the answer.
I saw your HTTP File Server project, i simplified it - i left only the http part in the project. The web page is on the sd card, it works well, but when i try download a jpg picture it does not work (i see only a hash in the browser, but the resolution is correct). The content type is image/jpeg.
Greetings!

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

Re: Additional library for MikroPascal PRO 2009

#58 Post by Dany » 16 Jan 2011 10:45

mjoco wrote:Hi Dany!
Thank you for the answer.
I saw your HTTP File Server project, i simplified it - i left only the http part in the project. The web page is on the sd card, it works well, but when i try download a jpg picture it does not work (i see only a hash in the browser, but the resolution is correct). The content type is image/jpeg.
Greetings!
Thanks.
I added the "jpg" type to the above project, files "index_page.mpas" and "HTTP_Server_Fat32.mpas". I was not able to test the change though...
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)

mjoco
Posts: 13
Joined: 06 Apr 2010 16:36

Re: Additional library for MikroPascal PRO 2009

#59 Post by mjoco » 18 Jan 2011 01:50

Hi Dany!
I made some attempt and now the server works great (jpg). The problem was the value of variable "Blocksize" - i have used a value of 1478, i think it was bad. Worked well with a value of 512 (now 1200).
Now i use the mPascal's mmc_fat library. Do you think your FAT32 library is faster? Should I exchange it according to you?
In the circuit i have a LED to indicate if the Socket[0] is connected. When i stop the downloading of the jpg in the browser (a few seconds after the start), the LED does not fall asleep. In an other case when the downloading is complete, the LED turn off. Why is that?
Greetings!

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

Re: Additional library for MikroPascal PRO 2009

#60 Post by Dany » 18 Jan 2011 10:31

mjoco wrote:Do you think your FAT32 library is faster? Should I exchange it according to you?
No, it is surely slower than the mPascal's mmc_fat library. If you do not need long filenames, subdirectories or an unlimited number of files in the main directory then it is better to stay with the mPascal's mmc_fat library I think. Keep in mind to format the sd/mmc card you use in Fat16 format in that case.
mjoco wrote:In the circuit i have a LED to indicate if the Socket[0] is connected. When i stop the downloading of the jpg in the browser (a few seconds after the start), the LED does not fall asleep. In an other case when the downloading is complete, the LED turn off. Why is that?
I do not know that. Perhaps you should ask Florin (Yo2Lio).
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”