Search found 106 matches

by cllow2020
19 Jun 2014 16:21
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS485 not working on dsPIC33FJ16GS504
Replies: 4
Views: 2392

Re: RS485 not working on dsPIC33FJ16GS504

working device is difference , i need to work on dsPIC33FJ16GS504 when config UART interrupt as 0x10 U1STAbits.URXISEL0 = 0; U1STAbits.URXISEL1 = 1; // Interrupt after one RX character is received . then, each time when changing using new address number, slave_RS485 need 2 times trigger to get a ret...
by cllow2020
14 Jun 2014 15:22
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS485 not working on dsPIC33FJ16GS504
Replies: 4
Views: 2392

Re: RS485 not working on dsPIC33FJ16GS504

// mikroCPRO dsPIC v.6.2.0 TRISBbits.TRISB8 = 0; // digital pin as output enable TX as output enable LATBbits.LATB8 = 0; // digital pin output to LO TX output=LO TRISBbits.TRISB15 = 1; // RX as input enable RB15 Unlock_IOLOCK(); PPS_Mapping_NoLock(15, _INPUT, _U1RX) ; // Sets pin 15 to be Input, an...
by cllow2020
14 Jun 2014 11:46
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS485 not working on dsPIC33FJ16GS504
Replies: 4
Views: 2392

Re: RS485 not working on dsPIC33FJ16GS504

any RS485_Slave_Example for dsPIC33FJ16GS504 ? /******************************************************************************/ /* Global Variable Declaration */ /******************************************************************************/ /* i.e. uint16_t <variable_name>; */ unsigned char Get_A...
by cllow2020
13 Jun 2014 09:45
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS485 not working on dsPIC33FJ16GS504
Replies: 4
Views: 2392

RS485 not working on dsPIC33FJ16GS504

any RS485_Slave_Example for dsPIC33FJ16GS504 ?
by cllow2020
09 Apr 2014 04:00
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS-485 Library
Replies: 3
Views: 1852

Re: RS-485 Library

thanks for clarify
by cllow2020
06 Apr 2014 13:09
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS-485 Library
Replies: 3
Views: 1852

Re: RS-485 Library

any reply from mikroElektronika team member ?
are this typing error or
have to type-in 2 line same code ?
by cllow2020
03 Apr 2014 14:39
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: RS-485 Library
Replies: 3
Views: 1852

RS-485 Library

refer to RS-485 Library, example, are this needed 2 line same code ? it does not make sense to me. RS485Slave_Init(160); // Intialize MCU as slave, address 160 ... ... URXISEL1_U2STA_bit = 0; URXISEL1_U2STA_bit = 0; ... or replace to this code U2STAbits.UTXISEL0 = 0; // Interrupt after one TX charac...
by cllow2020
19 Mar 2014 02:07
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Timer occupying most of CPU load
Replies: 5
Views: 2419

Re: Timer occupying most of CPU load

thank you for respond.
if external/extra chip need , any idea for this ?
i'm thinking of "signal pattern generator" 1 channel will do,
any info ?
by cllow2020
08 Mar 2014 03:39
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Timer occupying most of CPU load
Replies: 5
Views: 2419

Re: Timer occupying most of CPU load

RS232 interrupt run very slow, some time can't respond to PC. at first i thought might be 232 coding error. add-in a CN-interrupt () to see LED light-up more visualize the issue //void __attribute__ ((interrupt, no_auto_psv)) _CNInterrupt(void) //mplabx INT. code void CNInterrupt() iv IVT_ADDR_CNInt...
by cllow2020
07 Mar 2014 05:22
Forum: mikroC PRO for dsPIC30/33 and PIC24 General
Topic: Timer occupying most of CPU load
Replies: 5
Views: 2419

Timer occupying most of CPU load

when timer at high interrupting rate, CPU speed slow down. any idea to get back CPU speed ? add another chip? any idea? now my RS232 interrupt can't run. // MCU: dsPIC33FJ16GS504 // Oscillator: 80.000MHz // SW: mikroC PRO for dsPIC30/33 and PIC24 //Timer2/3 //Prescaler 1:1; PR3 Preload = 0; PR2 Prel...
by cllow2020
19 Jul 2011 02:22
Forum: mikroC PRO for PIC General
Topic: Using multiple interrupts
Replies: 21
Views: 10336

Re: Using multiple interrupts

have remove slave delay10ms and still works. faster now. :)

Code: Select all

        while( !dat[4] && U16flag++ );
wandering if it can go for 32 slave? at each 300m distance?
by cllow2020
16 Jul 2011 02:58
Forum: mikroC PRO for PIC General
Topic: Using multiple interrupts
Replies: 21
Views: 10336

Re: Using multiple interrupts

LED0 blanking seem looking sync. (to my stopwatch) by visual brief verification :wink: , 32768/tick at Timer1 prescaler to 1:1 TMR1H.B7 = 1; // 65536-32768=32768=0x8000, 1 tick/sec //TMR1L = 0x00; than using 4096/ticks, at Timer1 prescaler to 1:8; 4096/ticks run faster by brief visual inspection. co...
by cllow2020
15 Jul 2011 15:29
Forum: mikroC PRO for PIC General
Topic: Using multiple interrupts
Replies: 21
Views: 10336

Re: Using multiple interrupts

oops! i miss type some code if (tick_flg) { tick_flg=0; TMR1IE_bit =0; // only Mask the TMR1 interrupt while messing with TICK TMR1H = 0xF0; // 65536-4096=61440=0xF000, 1 tick/sec //TMR1L = 0x00; tick=tick%10; // Retain the left-over ticks tick=(tick/y)%10; sec += tick; // Add the accumulated second...
by cllow2020
15 Jul 2011 14:40
Forum: mikroC PRO for PIC General
Topic: Using multiple interrupts
Replies: 21
Views: 10336

Re: Using multiple interrupts

look better :) :) what will happen on RCIF_bit & TMR1IF_bit flg at the same time ? // Interrupt routine void interrupt() { if (RCIF_bit) { RS485Master_Receive(dat); } if (TMR1IF_bit) { tick_flg=1; tick++; TMR1IF_bit =0; } //timer ticks }//interrupt end ...... void main (){ ...... ... ..... while(1) ...
by cllow2020
15 Jul 2011 02:50
Forum: mikroC PRO for PIC General
Topic: Using multiple interrupts
Replies: 21
Views: 10336

Re: Using multiple interrupts

i use 16f1938 Test configuration: MCU: PIC16F1938 dev.board: 28SOIC LCD board Oscillator: internal RC , 16.0000 MHz Ext. Modules: Character LCD 2x16 SW: mikroC PRO for PIC 4.60 although i using Xtal, but doubt ? on the accuracy on 1 second tick ? how accurate it will be ? any input ? void main() { O...

Go to advanced search