Search found 109 matches

by MR2010
11 Jan 2013 00:42
Forum: mikroC PRO for PIC General
Topic: Makin a USB thumb drive
Replies: 6
Views: 2624

Re: Makin a USB thumb drive

i think stm32 can do the job ; I think a PIC18 ,PIC24,dsPIC33 and PIC32 can do the job what makes STM so Special For advenced projects ARM is much faster powerfull and to many pins,and already has OTG open source libraries,and cheap to buy.check for specs,anyway we are trying to help this guy,if yo...
by MR2010
17 Nov 2012 00:23
Forum: mikroC PRO for PIC General
Topic: Makin a USB thumb drive
Replies: 6
Views: 2624

Re: Makin a USB thumb drive

i think stm32 can do the job ;
by MR2010
16 May 2012 11:23
Forum: mikroC PRO for PIC General
Topic: IRP bit must be set manually for indirect access to
Replies: 10
Views: 4170

Re: IRP bit must be set manually for indirect access to

hi, i use "mikroc PRO for PIC v4.60". i get the follow warning: "IRP bit must be set manually for indirect access to datax variable". How can i fix it. Thank you. code look like this: //----------------------------------------- char datax[9][9]; unsigned int k=0; void main() {do { adc_rd=ADC_Read(2...
by MR2010
30 Apr 2012 12:01
Forum: mikroC PRO for PIC General
Topic: data comparison .
Replies: 4
Views: 1440

Re: data comparison .

You have to know how an unsigned long number is stored in memory. Using your example, pro = 0x50524f, it is stored as (low address) 4F 52 50 00 (high address). If you know how many characters is really stored in the number (your case = 3, 0x00 is not counted) you can use built-in library routines t...
by MR2010
30 Apr 2012 11:59
Forum: mikroC PRO for PIC General
Topic: data comparison .
Replies: 4
Views: 1440

Re: data comparison .

jtemples wrote:
if (pro = string)
"==" instead.

Read any good C book to be sure.
"=" is not my problem; check my signature link and have al look ;

Cheers
by MR2010
29 Apr 2012 22:36
Forum: mikroC PRO for PIC General
Topic: data comparison .
Replies: 4
Views: 1440

data comparison .

Hi everybody;


I am trying to compare received data of unsigned long with text ;


Ex: recieving unsigned long pro = 0x50524F want to compare it with string "PRO"

Code: Select all


if (pro = string)
{

//do something
}
tried strcmp didnt work;

Cheers;
by MR2010
03 Apr 2012 18:04
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

Re: PIC18F4685 SPI hardware and 9th bit;

Thanks jtemples .

still trying everythings no way spi clock problem;

Cheers;
by MR2010
01 Apr 2012 22:12
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

Re: PIC18F4685 SPI hardware and 9th bit;

the hardware spi is structured to send 8 bits. so it is tough to have a fully-hardware-implemented 9-bit solution. a few alternatives: 1) many spi slaves allow 8+ bits to be sent. they either take the last few bits (in your case last 9 bits) or they discard the the last few bits. so if your slave w...
by MR2010
31 Mar 2012 23:31
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

Re: PIC18F4685 SPI hardware and 9th bit;

to mE team ;

i used the logic analizer and the problem is mC compiler has bug in sending data on raising and falling edge ,
the problem in the CLK doesnt works as normal spi in mC library

anyone has any idea why and how to sort this out
by MR2010
31 Mar 2012 01:40
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

Re: PIC18F4685 SPI hardware and 9th bit;

Hi ; back again i tryed this but nothings . void WriteSpiData( char Dat) { SSPCON1.SSPEN = 0; TRISC.B5 = 0; // force to output mode TRISC.B3 = 0; // force to output mode LATC.B5 = 1; //SEND THE 9TH BIT LATC.B3 = 1; LATC.B3 = 0; SSPSTAT = 0b11000000; SSPCON1 = 0b10100000; SSPBUF =(dat&0xFF); } but sp...
by MR2010
31 Mar 2012 00:36
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

Re: PIC18F4685 SPI hardware and 9th bit;

Thank you for help i will give it a try ,about writing LATC for pic 16 was mistak of copy and past ,and about using mC spi library will never work bcz its slow and limited, anyway this code works on pic16 good but i wanted more speed and more space thats why im trying to use pic18;
Thanks everybody ;
by MR2010
29 Mar 2012 23:25
Forum: mikroC PRO for PIC General
Topic: PIC18F4685 SPI hardware and 9th bit;
Replies: 14
Views: 3038

PIC18F4685 SPI hardware and 9th bit;

Hello ; i'm trying to send 9 bits using spi1 hardware,it works on pic16f877a but not on pic18f4685 this function working good on pic16f877a void WriteSpiData( char Dat) { SSPCON= 0; //DISABLE SPI PORTC.B5 = 1; //SEND THE 9TH BIT PORTC.B3 = 1; PORTC.B3 = 0; SSPSTAT = 0b11000000; SSPCON = 0b10100000; ...
by MR2010
28 Feb 2012 22:02
Forum: mikroC PRO for PIC General
Topic: Calculating the Sampling Frequency on ADC
Replies: 3
Views: 1317

Re: Calculating the Sampling Frequency on ADC

Hi all, I am trying to write 8 bits out of the 10 bit offered by the pic16f877a microcontroller on to an mmc card, so basically I am just throwing away the other two bits. I am hoping to store a wave sound on to the mmc, but I am not quite sure how to determine the sampling rate (i.e. how often i s...

Go to advanced search