I want to use 18f97j60 for my project.
This is my first program but it doesn't work.
void main()
{TRISD=0;
TRISB=0;
ADCON1=0x0F;
while(1)
{PORTD=0;
PORTB=0;
Delay_ms(1000);
PORTD=0xFF;
PORTB=0xFF;
Delay_ms(1000);
}
}
I use 18f97j60, crystal 8Mhz, MikroC Version: 8.1.0.0
Search found 12 matches
- 15 Mar 2010 05:02
- Forum: mikroC General
- Topic: First program use 18f97j60
- Replies: 1
- Views: 1320
- 26 Feb 2010 13:33
- Forum: mikroC General
- Topic: I can't add data to sd card
- Replies: 3
- Views: 1682
Re: I can't add data to sd card
I solved my problem
I replaced
Mmc_Fat_Write(txt,sizeof(txt));
by
Mmc_Fat_Write(txt,sizeof(txt)-1);
Thank your great answer!!!
I replaced
Mmc_Fat_Write(txt,sizeof(txt));
by
Mmc_Fat_Write(txt,sizeof(txt)-1);
Thank your great answer!!!
- 23 Feb 2010 07:41
- Forum: mikroC General
- Topic: I can't add data to sd card
- Replies: 3
- Views: 1682
Re: I can't add data to sd card
I use 18f452
clock 8M
sd card transcend 512M
clock 8M
sd card transcend 512M
- 23 Feb 2010 06:36
- Forum: mikroC General
- Topic: I can't add data to sd card
- Replies: 3
- Views: 1682
I can't add data to sd card
This is my program. It runs very well char filename1[] = "MYFILE1.TXT"; char filename2[] = "MYFILE2.TXT"; char filename3[] = "MYFILE3.TXT"; char filename4[] = "MYFILE4.TXT"; unsigned char txt[] = "This is the added data..."; unsigned short character; unsigned char i; void write_data(char *filename) ...
- 04 Feb 2010 02:55
- Forum: mikroC General
- Topic: ADC interrupt
- Replies: 3
- Views: 8991
- 03 Feb 2010 05:09
- Forum: mikroC General
- Topic: what error???
- Replies: 1
- Views: 1249
what error???
This is my program char txt[768]; char *string; int i,j; unsigned short ready; unsigned char display_flag=0; unsigned char time[8],date[8],latitude[15],longitude[15],speed[5]; const char character1[] = {0,0,4,31,31,4,0,0}; const char character2[] = {0,28,14,31,14,28,0,0}; char *text = "GPS Tracking"...
- 02 Feb 2010 15:18
- Forum: mikroC General
- Topic: usart for pic18f4550
- Replies: 4
- Views: 2064
Thank your advise I edited project as your advise, but it didn't run.However if I check _FOSC_HS_1H flag, and _CPUDIV_OSC1_PLL2_1L it ran well. I read datasheet several times. But I'm really confusing about Oscillator modes. If I use 18f4550, clock 8M. I want to use USB module and other module adc,s...
- 01 Feb 2010 08:22
- Forum: mikroC General
- Topic: usart for pic18f4550
- Replies: 4
- Views: 2064
Thank for reply I'm new for MikroC.I don't know how to chang to external XT.Can you help me. I also have other question. I read in datasheet that:Users can program the FOSC3:FOSC0 configuration bits to select one of Oscillator modes. But I don't know FOSC3:FOSC0 belongs to what register and how to u...
- 31 Jan 2010 04:37
- Forum: mikroC General
- Topic: Using LCD library for PIC18F4550
- Replies: 4
- Views: 2817
How do you set the correct value for OSCCON register. Can you post your program I have also problem with OSCILLATOR CONTROL. I this is my program unsigned short i; void main() { USART_init(9600); // initialize USART module // (8 bit, 9600 baud rate, no parity bit...) while (1) { if (USART_Data_Ready...
- 31 Jan 2010 04:27
- Forum: mikroC General
- Topic: usart for pic18f4550
- Replies: 4
- Views: 2064
usart for pic18f4550
This is an example program. But I don't know it doesn't run. I use 18f4550, clock 11.0592M unsigned short i; void main() { USART_init(9600); // initialize USART module // (8 bit, 9600 baud rate, no parity bit...) while (1) { if (USART_Data_Ready()) { // if data is received i = USART_Read(); // read ...
- 29 Jan 2010 08:29
- Forum: mikroC General
- Topic: ADC interrupt
- Replies: 3
- Views: 8991
ADC interrupt
I want to read voltage at AN0->AN3 then display on PORTC and PORTD adc_data[] stores AD conversion result This is my program unsigned int adc_data[4]; unsigned char analog_selected=0; unsigned char adc_flag=0; void interrupt() { if(PIR1.ADIF==1) adc_flag=1; {if((analog_selected==0) && (adc_flag==1))...
- 26 Jan 2010 11:02
- Forum: mikroC General
- Topic: Need help with rs232 and lcd
- Replies: 1
- Views: 1103
Need help with rs232 and lcd
This is my program(LCD connect to PORTD) void Text_To_Usart(unsigned char *m) { unsigned char i; i = 0; while(m[i] != 0) { // Send TEXT to serial port Usart_Write(m[i]); i++; } } void Newline() { Usart_Write(0x0D); // Send carriage-return Usart_Write(0x0A); // Send line-feed } void main() {unsigned ...