Search found 30 matches

by blips
21 Jul 2010 10:24
Forum: mikroC General
Topic: RTC PCF 8583 error time with PIC 18f452
Replies: 10
Views: 4144

Re: RTC PCF 8583 error time with PIC 18f452

Its hard to help you without some code, but perhaps you are putting the 10 bit variable into a 8 bit variable causing overflow. You can disregard the 2 least significant bits by shifting

Code: Select all

foo = Adc_read(0) << 2; // foo will be of value 0 to 255
by blips
20 Jul 2010 21:21
Forum: mikroC General
Topic: PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. SOLVED!
Replies: 4
Views: 6944

Re: PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. so close!

Updated slave: /* MCU: P16F88 Dev.Board: EasyPIC4 Oscillator: INT OSC, 08.0000 MHz */ unsigned long cnt=0; unsigned long cnt2=0; unsigned float second=388; unsigned short test=0; //------------------------------------------------------------------------------ const Addy = 0xC2; // set I2C device add...
by blips
20 Jul 2010 21:12
Forum: mikroC General
Topic: PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. SOLVED!
Replies: 4
Views: 6944

Re: PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. so close!

Found a solution finally, The problem was with the master. I added a couple of delays.. void send(unsigned short send_data, unsigned short slave){ I2C_Init(100000); I2C_Start(); I2C_Wr(slave); Delay_ms(2); //2-20 sec <---- added delay I2C_Wr(send_data); Delay_ms(2); //2-20 sec <---- added delay I2C_...
by blips
20 Jul 2010 18:13
Forum: mikroC General
Topic: PIC 2 PIC Master/Slave Communication using I2C... Enjoy
Replies: 41
Views: 109000

Re: PIC 2 PIC Master/Slave Communication using I2C... Enjoy

Its been days and I haven't been able to get the posted code to work as it is. One error I'm sure of is the fact the slave address is 0x69, which is not an even number and hence the least significant bit will be set. There is also an SSPBUF read for every interrupt which is not O.K when you've got o...
by blips
20 Jul 2010 15:11
Forum: mikroC General
Topic: PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. SOLVED!
Replies: 4
Views: 6944

PIC 2 PIC I2C - Master: 18F4550 Slave: 16F88.. SOLVED!

Hi, For the past three weeks I have been trying to solve this problem and I am at the end of my rope here. I have searched just about everywhere, on this forum and elsewhere for a solution which has gotten me this far. Hope someone can spot the error I am making. First of all, I connect the SDA,SCL ...
by blips
14 Jun 2009 23:00
Forum: mikroC General
Topic: EasyPic5 and 4 mhz 9600 baud soft_uart problem
Replies: 2
Views: 1497

How is it not working?

Could you give us a code example?
by blips
14 Jun 2009 22:57
Forum: mikroC General
Topic: Looking to hire help with USB, USB bootloader, and 18f4450
Replies: 2
Views: 1644

Hi, Take a look at the schematic found here: http://www.sparkfun.com/commerce/tutorial_info.php?tutorials_id=108 There is a chip called FT232R, Datasheet: http://www.ftdichip.com/Documents/DataSheets/DS_FT232R.pdf A quick description of it (copy-ed from the sparkfun link): What is a USB to TTL conve...
by blips
12 Jun 2009 09:03
Forum: mikroC PRO for PIC General
Topic: Generating negative voltage from PWM - help
Replies: 7
Views: 5009

yes I guess you should double the voltage first and then invert

you could also use this if all else fails:
http://ww1.microchip.com/downloads/en/D ... 21465b.pdf

there is a sample schematic in the datasheet
by blips
12 Jun 2009 08:52
Forum: mikroC General
Topic: Stepper motor code
Replies: 5
Views: 4816

It was using wave step, I modified the code now so it does wave, full and halfstep. I will post it on the forumn soon
by blips
10 Jun 2009 22:27
Forum: mikroC General
Topic: Servo motor speed control using PIC16F877
Replies: 3
Views: 2806

omg! I'm so sorry.. I read stepper, not servo :) you cant make a servo go faster, however you can make it go slower.. I have never made a servo go slow, but I guess you could use a FIR filter to make the movements smoother and/or slower. Or a quicker way would be to move in smaller intervals. Instea...
by blips
10 Jun 2009 17:43
Forum: mikroC General
Topic: Servo motor speed control using PIC16F877
Replies: 3
Views: 2806

just decrease the time between steps --> more speed...

I'm not sure what you are asking?
by blips
10 Jun 2009 13:53
Forum: mikroC General
Topic: Pic to Pic Usart
Replies: 45
Views: 20436

Not possible in the usart module I think.
Give soft usart a try
by blips
10 Jun 2009 13:50
Forum: mikroC General
Topic: controller hang while SD card WRITE operation
Replies: 1
Views: 1175

Does it matter if the vehicle is running or not? What frequency is the noise? is there a decent ground plane on your pcb? (It reduces noise significantly) Have you tried adding a bypass cap at well chosen location to see if the noise reduces? you can use a resistor instead of the inductor in the low...
by blips
10 Jun 2009 09:36
Forum: mikroC General
Topic: TTL Logic on 12F629
Replies: 3
Views: 1860

Go to advanced search