Search found 109 matches
- 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...
- 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 ;
- 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: 4171
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...
- 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...
- 30 Apr 2012 11:59
- Forum: mikroC PRO for PIC General
- Topic: data comparison .
- Replies: 4
- Views: 1440
Re: data comparison .
"=" is not my problem; check my signature link and have al look ;jtemples wrote:"==" instead.if (pro = string)
Read any good C book to be sure.
Cheers
- 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"
tried strcmp didnt work;
Cheers;
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
}
Cheers;
- 03 Apr 2012 18:04
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
Re: PIC18F4685 SPI hardware and 9th bit;
Thanks jtemples .
still trying everythings no way spi clock problem;
Cheers;
still trying everythings no way spi clock problem;
Cheers;
- 01 Apr 2012 22:12
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
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...
- 01 Apr 2012 21:15
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
Re: PIC18F4685 SPI hardware and 9th bit;
Thanks mince ;
- 01 Apr 2012 20:36
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
- 31 Mar 2012 23:31
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
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
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
- 31 Mar 2012 01:40
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
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...
- 31 Mar 2012 00:36
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
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 ;
Thanks everybody ;
- 29 Mar 2012 23:25
- Forum: mikroC PRO for PIC General
- Topic: PIC18F4685 SPI hardware and 9th bit;
- Replies: 14
- Views: 3039
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; ...
- 28 Feb 2012 22:02
- Forum: mikroC PRO for PIC General
- Topic: Calculating the Sampling Frequency on ADC
- Replies: 3
- Views: 1318
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...