Search found 15 matches

by markkoh
30 Mar 2024 10:11
Forum: mikroBasic PRO for PIC32 General
Topic: Net_Ethernet_Intern_doDHCPLeaseTime() problem
Replies: 28
Views: 10066

Re: Net_Ethernet_Intern_doDHCPLeaseTime() problem

I encounter the same DHCP issue when working with ENC28J60 chip. After reading all your comments and post... I realize I did not enable my global interrupt bit, therefore my SPI_Ethernet_UserTimerSec reg counter isn't inc every seconds... and since SPI_Ethernet_initDCHP depends on SPI_Ethernet_UserT...
by markkoh
20 Mar 2008 18:20
Forum: mikroC General
Topic: DS1302 program for MikroC
Replies: 20
Views: 22420

It is "SECOND" register, not 2nd register........ 8)
by markkoh
20 Mar 2008 16:17
Forum: mikroC General
Topic: DS1302 program for MikroC
Replies: 20
Views: 22420

CH = Clock Halt. See Pg 7 on the Datasheet. You can find this inside SECOND register.

Good Luck!
Mark
by markkoh
19 Mar 2008 20:21
Forum: mikroC General
Topic: DS1302 program for MikroC
Replies: 20
Views: 22420

Need some correction to my code.. For routine DS1302_CLOCK_READ and DS1302_RAM_READ, pls change Line---> if(DS1302_IO_DATA) dat.F0 = 1; else dat.F0 = 0; // input data dat = dat << 1; // shift bit one step to left To ---> if(DS1302_IO_DATA) dat.F7 = 1; else dat.F7 = 0; // input data dat = dat >> 1; /...
by markkoh
19 Mar 2008 20:01
Forum: mikroC General
Topic: DS1302 program for MikroC
Replies: 20
Views: 22420

Yes, DS1302 uses a special interface, it is neither SPI or I2C, user need to learn and rewrite new routine interface with this IC. As I have said before, try to avoid using this IC. But of some reasons, you must use DS1302, I've include example code for you as reference. I have been using this IC fo...
by markkoh
18 Mar 2008 19:44
Forum: mikroC General
Topic: DS1302 program for MikroC
Replies: 20
Views: 22420

DS1302 is a good RTC, but the datasheet is not so straigth forward, it need somebody with hi IQ in order to understand!

If you can go for PFC8563(philips) or similar series, cheaper and easiler. Codes are available. :D
by markkoh
18 Mar 2008 19:33
Forum: mikroC General
Topic: Format time on RTC
Replies: 6
Views: 2677

Simple.

Take for example, if the current minute is 37, you read the register, it will give you 0x37 (Hexdecimal). However, this is not useful to you because 0x37 = 55 (decimal). So far, get it?

So after conversation, your result will be 37(Decimal). :wink:
by markkoh
16 Mar 2008 21:14
Forum: mikroC General
Topic: I2C bugs in Ver8.1?
Replies: 2
Views: 1510

I did include 10K resistor to both SDA & SCL line.

Mark.
by markkoh
16 Mar 2008 21:12
Forum: mikroC General
Topic: I2C bugs in Ver8.1?
Replies: 2
Views: 1510

I2C bugs in Ver8.1?

Hi All, I wasted 7hrs just trying to get my I2C work :evil: ! I am using PIC18F87J10 to communicate with PCF8563 Real Time Clock, but never able to get ACK back. (Bebug using Agilent 54622D digital scope) However, out of fustration, I change it to Soft_I2C lib, and it WORKS :shock: !! I can read & w...
by markkoh
14 Mar 2008 15:22
Forum: mikroC General
Topic: usb cdc typedefs union struct problem ?bug
Replies: 2
Views: 2110

Try this TYPEDEFS.H file, it works. Rdgs, Mark #ifndef TYPEDEFS_H #define TYPEDEFS_H #define OSCTUNEbits OSCTUNE #define WDTCONbits WDTCON #define INTCON2bits INTCON2 #define UCFGbits UCFG #define UCONbits UCON #define UIRbits UIR #define UIEbits UIE #define PIR2bits PIR2 #define PIE2bits PIE2 #defi...
by markkoh
27 Feb 2008 15:20
Forum: mikroC General
Topic: Higher speed for CDC RS232 routine
Replies: 9
Views: 4575

hi pwdixon, thanks for the link. I did study that too, but may not be practical solution for me. I rather let myself suffer the pains first then asking everybody who uses my hardware to learn HID programming! It will takes time for the next generation of IT guys to pick-up HID programming, but right...
by markkoh
26 Feb 2008 18:42
Forum: mikroC General
Topic: Higher speed for CDC RS232 routine
Replies: 9
Views: 4575

Hi Keanhee, sorry, can only share after cleaning it up. Too messy, spent 4 days & night sorting and porting pieces by pieces, just to ensure 100% no compiling errors. I am not even a C programmer, just good at assembly code. Code was written for PIC18F67J50. I believe you should able to port it over...
by markkoh
26 Feb 2008 01:17
Forum: mikroC General
Topic: Higher speed for CDC RS232 routine
Replies: 9
Views: 4575

Higher speed for CDC RS232 routine

HI, After converting Microchip example USB CDC RS232 to MikroC code, it works just fine, Window XP can detect and create a virtual rs232 comm port, VB programming Ok. I just want to ask if anybody out there able to achieve a higher baud rate then 14.4Kbps? Both C18 and MikroC routines baud rate are ...
by markkoh
14 Jan 2006 12:11
Forum: mikroC General
Topic: USART_Init(xxxx) can not work with PIC18F8621
Replies: 3
Views: 2134

Thanks Pizon, :lol: Now I release there is more lib available and tailored to each type of microcontroller. It works fine... but still facing compiler error message as I proceed. Anyway, I will change the device type to PIC18F8627, it compiled perfect!! Furthermore, MICROCHIP no longer selling PIC18...
by markkoh
13 Jan 2006 18:42
Forum: mikroC General
Topic: USART_Init(xxxx) can not work with PIC18F8621
Replies: 3
Views: 2134

USART_Init(xxxx) can not work with PIC18F8621

Hi, I'm new to mikroC, and is evaluating the demo copy from your web-site. It is well done and easy to use. However, the IDE refuse to compile/build my sample code (see below) main() { Usart_Init(2400); } Please note that I have selected PIC18F8621 microcontroller. However, with PIC18F452, it is OK....

Go to advanced search