Additional library for MikroBasic PRO 2009

General discussion on mikroBasic PRO for PIC.
Author
Message
piort
Posts: 1379
Joined: 28 Dec 2005 16:42
Location: Laval,Québec,Canada,Earth... :-)
Contact:

Re: Additional library for MikroBasic PRO 2009

#91 Post by piort » 04 Jun 2010 17:28

hi,
for the MRF24J40MA RF chip you will find exemple in this file http://www.mikroe.com/eng/downloads/get ... c_v100.zip.

hth a bit ;-)

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

Re: Additional library for MikroBasic PRO 2009

#92 Post by yo2lio » 04 Jun 2010 17:44

dmtulsa wrote:I understand there is a library for the MRF24J40MA RF chip. I've tried to follow links posted here but they seem to be dead.

Where can I find the Library or source code for the library.
http://www.mikroe.com/eng/downloads/get ... c_v100.zip
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

pekote
Posts: 7
Joined: 22 Apr 2010 11:50
Location: Patagonia, Argentina

Re: Additional library for MikroBasic PRO 2009

#93 Post by pekote » 11 Jun 2010 15:27

Hello yo2lio

I noticed that some of your libraries have the same functions as Mikroe libraries. Ex, string library. I saw several functions that perform the same function as string library from Mikroe. What is the reason for that?

Recently I had some problems with the string library from mikroe and I'm wondering if your version could work better in my code.

Thanks for sharing your code!

Regards
Pekote
From Patagonia, Argentina

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

Re: Additional library for MikroBasic PRO 2009

#94 Post by yo2lio » 11 Jun 2010 21:58

pekote wrote: I noticed that some of your libraries have the same functions as Mikroe libraries. Ex, string library. I saw several functions that perform the same function as string library from Mikroe. What is the reason for that?
Hello,
I made my own libraries, string library together with Janni, I wrote part from libraries in ASM and are highly optimized.
This for all type of MCU's, PIC, dsPIC, ATMEL and 8051.
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

stevenindon
Posts: 466
Joined: 18 Apr 2008 03:46

Re: Additional library for MikroBasic PRO 2009

#95 Post by stevenindon » 16 Jun 2010 05:50

Florin,

Code: Select all

          Socket[CC_Sock].RAM_ROM = 0
          Socket[CC_Sock].Keep_Alive = false
          Socket[CC_Sock].Start_addr = @strLongString
          Socket[CC_Sock].Stop_addr = @strLongString + strLen(strLongString)
I have tried this with windows 7 running on IE8 indicated connection error to the page. It is all running well if i am using Socket[CC_Sock].RAM_ROM = 1 with constant html page.

Any idea?

Thanks.

pilar
Posts: 23
Joined: 25 Nov 2008 03:46

Re: Additional library for MikroBasic PRO 2009

#96 Post by pilar » 23 Jun 2010 21:28

Hello Florin,

I want to use your library code and ZABBIX_module hardware but I have a doubt, in schematic diagram the crystal that you're using is 25MHz, but the project setting you are using a crystal of 41.6667MHz, which is correct?

Drigo
Posts: 66
Joined: 23 Jun 2009 10:23

Re: Additional library for MikroBasic PRO 2009

#97 Post by Drigo » 08 Jul 2010 06:49

I having a trouble with the sensirion code. I added the whole project. The trouble is, if no sensirion sensor is connected, the program hang. Now the watchdogtimer is the solution. but this can not be the glory cral. What I can do against the crash? Is a newer version available?

Tryed this one, but doesn't work:

Code: Select all

TrisA.0 = 1
if RA0_bit = 0 then
     Lcd_Out(1,1,"  Innenfõhler   ")
     Lcd_Out(2,1," nicht gefunden ")
     do
     clrwdt
     loop until ((TasteMenue = 1) and (TasteAendern = 1))
     reset
end if
sensirion_init(PORTA,0,2)
NoError = sensirion_get_temp_hum(TempInnen, RelativInnen,TaupunktInnen,AbsolutInnen)
if NoError = 0 then
Exit
end if
TrisA.1 = 1
if RA1_bit = 0 then
     Lcd_Out(1,1,"  Aussenfõhler  ")
     Lcd_Out(2,1," nicht gefunden ")
     do
     clrwdt
     loop until ((TasteMenue = 1) and (TasteAendern = 1))
     reset
end if
sensirion_init(PORTA,1,3)
NoError = sensirion_get_temp_hum(TempAussen, RelativAussen,TaupunktAussen,AbsolutAussen)
if NoError = 0 then
Exit
end if
Attachments
Firmware 0.8.zip
(9.43 KiB) Downloaded 323 times

Drigo
Posts: 66
Joined: 23 Jun 2009 10:23

Re: Additional library for MikroBasic PRO 2009

#98 Post by Drigo » 08 Jul 2010 08:23

OK. Trouble solved.
dim NoError as boolean
is better then
dim NoError as byte

Drigo
Posts: 66
Joined: 23 Jun 2009 10:23

Re: Additional library for MikroBasic PRO 2009

#99 Post by Drigo » 08 Jul 2010 09:13

OK same trouble. When I remove Dataline from the sensirion, the failure will be acknoledged. But if I remove the Clockline, the watchdog "bite" .
I maked a little testprogram for this. Its in the attached file. What can I do ?
Attachments
SHT Fehler Überwachung.zip
(3.58 KiB) Downloaded 359 times

TorMagne
Posts: 7
Joined: 06 Feb 2008 21:34
Location: Bergen, Norway

Re: Additional library for MikroBasic PRO 2009

#100 Post by TorMagne » 10 Sep 2010 12:46

Hi,

Does this library work with MikroBasic PRO V3.8?

I've tried it on a windows 7 64bit, Vista 32bit and a XP 32bit machines, and I can't find the libraries in the Library Manager.

So I wonder if its not compatible with the latest version of MikroBasic.

I use a PIC18F4420 controller

any reply would be appreciated

Thanx!

cllow2020
Posts: 106
Joined: 06 Nov 2007 10:26

Re: Additional library for MikroBasic PRO 2009

#101 Post by cllow2020 » 12 Sep 2010 05:51

i've problem to add in sensirion_lib_p16.mcl into program.
compiler echo "sensirion_lib_p16.mcl" not found. but i already add this file into ...\uses\P16 and add file at project manager. any step i do wrong ?

Code: Select all

'     MCU:             PIC16F688
'     Dev.Board:       LCD board
'     Oscillator:      HS, 08.0000 MHz
'     Ext. Modules:    -
'     SW:              mikroBasic PRO for PIC    3.8
' *
program mb_shtxxLCD

include "sensirion_lib_p16"

' Declarations section
dim uart_rd as byte

' Lcd module connections
dim txt1 as char[16]
dim LCD_RS as sbit  at RA4_bit
    LCD_EN as sbit  at RA2_bit
    LCD_D4 as sbit  at RC0_bit
    LCD_D5 as sbit  at RC1_bit
    LCD_D6 as sbit  at RC2_bit
    LCD_D7 as sbit  at RC3_bit

    LCD_RS_Direction as sbit at TRISA4_bit
    LCD_EN_Direction as sbit at TRISA2_bit
    LCD_D4_Direction as sbit at TRISC0_bit
    LCD_D5_Direction as sbit at TRISC1_bit
    LCD_D6_Direction as sbit at TRISC2_bit
    LCD_D7_Direction as sbit at TRISC3_bit
' End Lcd module connections


sub procedure Delay1S()         ' Function used for text moving
  Delay_ms(1000)                ' You can change the moving speed here
end sub

' Main program
main:
  TRISC = 0
  PORTC = 0
  TRISA = 0xFF
  ANSEL = 0                     ' Configure AN pins as digital I/O
  txt1 = "Test slave"
  
  Lcd_Init()                     ' Initialize Lcd
  Lcd_Cmd(_LCD_CLEAR)            ' Clear display
  Lcd_Cmd(_LCD_CURSOR_OFF)       ' Cursor off
  Lcd_Out(1,6,txt1)              ' Write text in first row
  Delay_ms(2000)
  'Lcd_Cmd(_LCD_CLEAR)            ' Clear display
  
  UART1_Init(9600)                     ' Initialize UART module at 9600 bps
  Delay_ms(100)                        ' Wait for UART module to stabilize
  UART1_Write_Text("Ready")
  UART1_Write(10)                      ' Line Feed
  UART1_Write(13)                      ' Carriage Return

  sensirion_init(PORTA,0,1);      'sensirion_init(port,data,clock);

  while (TRUE)                         ' Endless loop
    if (UART1_Data_Ready() <> 0) then  ' If data is received,
      uart_rd = UART1_Read()           ' read the received data,
      UART1_Write(uart_rd)             ' and send data via UART
    end if
    ' //sensirion code here//
   
    
  wend
end.

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

Re: Additional library for MikroBasic PRO 2009

#102 Post by yo2lio » 12 Sep 2010 15:32

Hello,

I did not provided this mcl file.

You con download this file and lib_delays_lio.mbas from here: http://www.microelemente.ro/sensirion.zip
Copy this 2 files in /USES/P16 and include also "lib_delays_lio" at the beginning of program

Code: Select all

'     MCU:             PIC16F688
'     Dev.Board:       LCD board
'     Oscillator:      HS, 08.0000 MHz
'     Ext. Modules:    -
'     SW:              mikroBasic PRO for PIC    3.8
' *
program mb_shtxxLCD

include "lib_delays_lio"
include "sensirion_lib_p16"

' Declarations section
dim uart_rd as byte

...
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

cllow2020
Posts: 106
Joined: 06 Nov 2007 10:26

Re: Additional library for MikroBasic PRO 2009

#103 Post by cllow2020 » 12 Sep 2010 20:41

great, its working :P, thanks . refer to attachment mbpro_SHT.rar
mistake i did:-
1) edit & compile .pbas to .mbas
2) did not goto "project clean folder" cleanup

is there a guide for upgrade from .pbas to .mbas ?
Attachments
mbpro_SHT.rar
compiled
(12.69 KiB) Downloaded 425 times
MikroBasic_Sensirion_lib.rar
lib_P16_P18 files
(219.81 KiB) Downloaded 401 times

cllow2020
Posts: 106
Joined: 06 Nov 2007 10:26

Re: Additional library for MikroBasic PRO 2009

#104 Post by cllow2020 » 13 Sep 2010 03:11

ok ...found & reading the migration doc now. in help manual.

regards

cllow2020
Posts: 106
Joined: 06 Nov 2007 10:26

Re: Additional library for MikroBasic PRO 2009

#105 Post by cllow2020 » 13 Sep 2010 15:22

is possible to open source code in mb_pro ? notice that mcl file side smaller than compiled at mbasic.

regards

Post Reply

Return to “mikroBasic PRO for PIC General”