Search found 62 matches
- 31 Jul 2015 13:11
- Forum: mikroC PRO for PIC General
- Topic: I2C slave on 18F2420
- Replies: 1
- Views: 2640
I2C slave on 18F2420
Dear members, I'm trying to get the 18F2420 to work in i2c slave mode. Below is my code. I modified it from my working 16f1938 code, yet it does not work on 18F2420 nor on 18F2550. I guess I'm missing some registry setting - although I double checked it - no luck. Help much appreciated! // Lcd pinou...
- 28 Dec 2014 23:33
- Forum: Libstock Discussion
- Topic: Send HTML request from PIC
- Replies: 0
- Views: 2818
Send HTML request from PIC
Hello,
I have PIC18F4620 connected to ENC28J60.
I would like to use my PIC as a simple web CLIENT - it should request "http://192.168.2.10/data.php?v=VALUE"
There are some examples of http server but not a client.
Please advise.
best regards,
pepesz
I have PIC18F4620 connected to ENC28J60.
I would like to use my PIC as a simple web CLIENT - it should request "http://192.168.2.10/data.php?v=VALUE"
There are some examples of http server but not a client.
Please advise.
best regards,
pepesz
- 13 Mar 2012 16:49
- Forum: mikroC PRO for PIC General
- Topic: is optional argument in function possible?
- Replies: 6
- Views: 1514
Re: is optional argument in function possible?
@Mince-n-Tatties It's not a 'must have' but it can be handy. I'm using the function with 6 arguments, while in most cases only two are needed. If I'm using this function 20 times and only 2 times with all 6 arguments than it is much more handy to write func(a, b) instead of func(a, b, 0,0,0,0). It i...
- 05 Mar 2012 12:02
- Forum: mikroC PRO for PIC General
- Topic: is optional argument in function possible?
- Replies: 6
- Views: 1514
Re: is optional argument in function possible?
Thanks Filip,
Your workaround will not work i.e.
add(1,2,3) will return 3 instead of 6.
I'll try another approach.
Thanks again.
pepesz
Your workaround will not work i.e.
add(1,2,3) will return 3 instead of 6.
I'll try another approach.
Thanks again.
pepesz
- 05 Mar 2012 06:49
- Forum: mikroC PRO for PIC General
- Topic: is optional argument in function possible?
- Replies: 6
- Views: 1514
is optional argument in function possible?
Hello,
Is i possible (and how) to use optional arguments in functions in mikroc?
Something like this:
and use it as:
?
I couldn't find it. Thanks a lot!
Is i possible (and how) to use optional arguments in functions in mikroc?
Something like this:
Code: Select all
char add(char x, char y, char z=0)
{
return x+y+z
}
Code: Select all
sum = add(1,2) //sum = 3
sum = add(1,2,1) //sum = 4
I couldn't find it. Thanks a lot!
- 15 May 2009 10:48
- Forum: mikroC General
- Topic: 2x16 LCD PROBLEM ON PIC16F887
- Replies: 5
- Views: 2278
- 13 May 2009 11:13
- Forum: mikroC General
- Topic: I2C port expander (PCF8574) +LCD16x2 Howto?
- Replies: 0
- Views: 1232
I2C port expander (PCF8574) +LCD16x2 Howto?
Dear All, Does someone have experience with interfacing the LCD16x2 with PIC via I2C port expander? I have the PCF8574 I2C expander and I assume it shouldn't be difficult to physically interface it, however I'm too newbe to even thing of writing my own library to access the LCD. If someone has exper...
- 06 May 2009 09:01
- Forum: mikroC General
- Topic: Problems with PIC16F628A LED flashing
- Replies: 8
- Views: 6128
- 27 Apr 2009 14:41
- Forum: mikroC General
- Topic: USART data + LCD timing problem - help
- Replies: 7
- Views: 3088
I think I know what you want to say. If i'm not mistaken in your example when something appears on the RX the interrupt read single char, thats it. so when next char appears the interrupt will read the next char. In between something in the main loop is executed. Am I correct? The trick is as you sa...
- 27 Apr 2009 12:16
- Forum: mikroC General
- Topic: USART data + LCD timing problem - help
- Replies: 7
- Views: 3088
@drdoug I used your example http://www.mikroe.com/forum/viewtopic.php?t=19530, although I'm not sure if my approach is good. Here is my code void interrupt(){ if(PIR1.RCIF) { // test the interrupt for uart rx GGA = 0; do{ if (Usart_Data_Ready()) { rxchar = Usart_Read(); if (rxchar=='$') {count=0;} h...
- 26 Apr 2009 10:57
- Forum: mikroC General
- Topic: USART data + LCD timing problem - help
- Replies: 7
- Views: 3088
If I place the LCD_OUT outside 'if string GPGGA or GPRMC detection' but still within the do {...}while then I'm not detecting anything. The best would be to move inside of do...while into the separate function and then call it when data arrives (how?) and exit the function after receiving both strin...
- 25 Apr 2009 23:05
- Forum: mikroC General
- Topic: USART data + LCD timing problem - help
- Replies: 7
- Views: 3088
USART data + LCD timing problem - help
Hi all, I have the small program to read GPS NMEA strings via USART and display the time from two strings: GPGGA and GPRMC. Example of those strings: $GPGGA,hhmmss.ss,llll.ll,a,yyyyy.yy,a,x,xx,x.x,x.x,M,x.x,M,x.x,xxxx*hh $GPRMC,081836,A,3751.65,S,14507.36,E,000.0,360.0,130998,011.3,E*62 The problem ...
- 23 Apr 2009 10:09
- Forum: mikroC General
- Topic: bug in onewire ds18b20 example ?
- Replies: 42
- Views: 20053
@THE_RB I do have already the conversion routine. I was more interested in the routine which drives the FET for strong pull-up. Why you use only 120us delay after issuing CONVERT_T ? The conversion time is at least 200ms! meaning that you in fact displaying the temperature fron the PREVIOUS measurem...
- 22 Apr 2009 21:03
- Forum: mikroC General
- Topic: USART communication problem :(
- Replies: 29
- Views: 9319
- 21 Apr 2009 18:23
- Forum: mikroC General
- Topic: USART communication problem :(
- Replies: 29
- Views: 9319
It is working now :D I'm still using usb cable (1,5m) and 20MHz xtal. I made simple (2 bipolar transistors plus couple of resistors) voltage level shifter - it was easier then using mosfet approach for which I would require use of 3.3V regulator. It goes Hi when input is above 2.5V Thanks a lot for ...