Search found 139 matches

by Andreas
26 Dec 2015 19:39
Forum: mikroPascal General
Topic: Help - Floating point, Microchip-> IEEE 754
Replies: 9
Views: 8523

Re: Help - Floating point, Microchip-> IEEE 754

Thanks, Janni, you are a real life saver. For all that want examples of the PIC side: //PIC to PC //mP VAR r : REAL; UART1_Write(Highest(r)); UART1_Write(Higher(r)); UART1_Write(HI(r)); UART1_Write(LO(r)); //Delphi VAR buf : picbuf; VAR d : double; buf[1] := ReceiveByte; buf[2] := ReceiveByte; buf[3...
by Andreas
25 Dec 2015 23:00
Forum: mikroPascal General
Topic: Help - Floating point, Microchip-> IEEE 754
Replies: 9
Views: 8523

Re: Help - Floating point, Microchip-> IEEE 754

Many thanks for the Delphi code. Do you also have the reverse function "float2pic" ?
by Andreas
14 Jan 2014 18:54
Forum: mikroPascal General
Topic: Here are my I2C slave routines
Replies: 8
Views: 16197

Re: Here are my I2C slave routines

Hi, it is really not that difficult. Just read the PIC's spec and the help in the Compiler. I hope this helps: VAR TmpWord : WORD; ADValue : ARRAY[8] OF WORD; CommandByte, dummy, ADCheckSum : BYTE; //****************************************************************************** PROCEDURE ReadAD; //T...
by Andreas
18 Jun 2012 15:44
Forum: mikroPascal PRO for PIC General
Topic: SPI Ethernet Library and Large Amounts of Data
Replies: 9
Views: 4084

Re: SPI Ethernet Library and Large Amounts of Data

Hello,
so, basically I would need to do this:

1. Call doPacket (which calls userTCP)
2. Inside userTCP, place data in the ENC's buffer
3. If buffer is full, initiate a packet send
4. Repeat 2&4 until all data is send
5. Exit userTCP

Question is: How do I do steps 2&3 ?
by Andreas
15 Jun 2012 16:51
Forum: mikroPascal PRO for PIC General
Topic: SPI Ethernet Library and Large Amounts of Data
Replies: 9
Views: 4084

Re: SPI Ethernet Library and Large Amounts of Data

Well, a socket for > 150€ is not exactly in the budget. I would prefer to somehow manually write to the ENC's buffer. The question is only: Is that possible and if so, how?
by Andreas
14 Jun 2012 21:57
Forum: mikroPascal PRO for PIC General
Topic: SPI Ethernet Library and Large Amounts of Data
Replies: 9
Views: 4084

Re: SPI Ethernet Library and Large Amounts of Data

Hello, for serviceability reasons I would like to have a removable PIC. The biggest one I could find is the 18F4685, which I'm already using. So, a PIC with more RAM is not an option. Is there any way to trick the original library? Is it possible to manually write to the ENC's buffer and trigger an ...
by Andreas
13 Jun 2012 19:37
Forum: mikroPascal PRO for PIC General
Topic: SPI Ethernet Library and Large Amounts of Data
Replies: 9
Views: 4084

Re: SPI Ethernet Library and Large Amounts of Data

Thanks for your answer, Janko, but there is another problem: The new library uses about 2.8kB of RAM. My program also includes the MMC library. There is not enough RAM for both. Is there any way to reduce the ethernet library's hunger for RAM? To bring it down to, let's say, 1kB? Thanks for your rep...
by Andreas
07 Jun 2012 23:29
Forum: mikroPascal PRO for PIC General
Topic: SPI Ethernet Library and Large Amounts of Data
Replies: 9
Views: 4084

SPI Ethernet Library and Large Amounts of Data

Hi, I use the SPI Ethernet Library and when I send about 500Bytes as an answer to a TCP request, it works just fine. But when I try to send 10kB that doesn't work. Nothing at all is send. It seems that the library waits until SPI_Ethernet_UserTCP is exited and then sends the data. If it is too much,...
by Andreas
25 Apr 2012 19:41
Forum: mikroPascal PRO for PIC General
Topic: Addressing multiple DS18S20 temperature sensors
Replies: 5
Views: 6009

Re: Addressing multiple DS18S20 temperature sensors

Hi, I don't know why, but the mE OneWire lib does not work for me, so I wrote my own routines. Please find them below. This includes wire length compensation. VAR OWpinTRIS : SBIT AT TRISC.1; OWpinLAT : SBIT AT LATC.1; OWpinPORT : SBIT AT PORTC.1; SensorID : ARRAY[1..3] OF ARRAY[0..7] OF BYTE; //3 s...
by Andreas
23 Apr 2012 20:50
Forum: mikroPascal PRO for PIC General
Topic: Addressing multiple DS18S20 temperature sensors
Replies: 5
Views: 6009

Re: Addressing multiple DS18S20 temperature sensors

Hi MAN, Dany, many thanks for your answers. Unfortunately MAN's example does not contain the part of the code that I need. Dany's lib does contain the right part, and it is exactly the same algorithm I'm using. It still doesn't work. But I realized one thing: Your code seems to be be for a PIC16, I'...
by Andreas
22 Apr 2012 12:21
Forum: mikroC PRO for PIC General
Topic: DS18S20 thermometer 0.1C resolution
Replies: 5
Views: 2568

Re: DS18S20 thermometer 0.1C resolution

Hi Aleksandr, I also had problems with calculating the fraction part properly. Your code is: extended_temperature = temperature_integer - 0.25 + (COUNT_PER_C - COUNT_REMAIN)/COUNT_PER_C; My code in mEPascal is: LO(RawTempINTEGER) := Ow_Read(PORTC, 1); HI(RawTempINTEGER) := Ow_Read(PORTC, 1); ... Tru...
by Andreas
21 Apr 2012 22:24
Forum: mikroPascal PRO for PIC General
Topic: Addressing multiple DS18S20 temperature sensors
Replies: 5
Views: 6009

Addressing multiple DS18S20 temperature sensors

Hi there, I'm trying to read several DS18S20 temperature sensors on the same bus. Reading just one sensor with the SkipROM command works. Reading the 64 bit ID of a single sensor works. But if I use the MatchROM command I get nothing back. What am I doing wrong? Thanks Andreas PROCEDURE ReadTempSens...
by Andreas
02 Mar 2012 23:09
Forum: mikroPascal PRO for PIC General
Topic: Re-assign SBIT ?
Replies: 2
Views: 1909

Re-assign SBIT ?

Hi,
I would like to use two LCDs (ASCII, not graphic). For that I need to re-assign the enable pin.

So, under VAR I have this:
LCD_EN : sbit at LATB.1;

Somewhere in the code I would like to do something like:

LCD_EN := sbit at LATB.5;

Is there any way to do that? Or another way for 2 LCDs?
by Andreas
29 Dec 2011 12:44
Forum: mikroPascal PRO for PIC Wish List
Topic: Bootloader self protection and automatic file update
Replies: 3
Views: 3811

Re: Bootloader self protection and automatic file update

Firmware: //mikroPascal PRO for PIC501\Examples\Other\Bootloader\P18\8K\boot_test.mpppi
Application: MikroElektronika Bootloader v2.1.0.0
PIC: 18F2320
by Andreas
26 Dec 2011 13:32
Forum: mikroPascal PRO for PIC Wish List
Topic: Bootloader self protection and automatic file update
Replies: 3
Views: 3811

Bootloader self protection and automatic file update

Hi, it would be great if the bootloader would refuse to overwrite itself. I'm on vacation and didn't bring my burner. My program got so big that it reached into the bootloader memory location and the bootloader excepted that and overwrote itself. Now I'm stuck and can't work on my project any more t...

Go to advanced search