Search found 57 matches

by nsilva
23 Jan 2015 20:41
Forum: mikroC PRO for PIC General
Topic: Is there a way to transfer audio and data via USB for PC
Replies: 1
Views: 957

Is there a way to transfer audio and data via USB for PC

Hi, I want to build a hardware where I communicate with PC via USB (HID). The microcontroller must send audio data and control data simultaneously without interfering with one another. The control data must follow the protocol "send data / receive response" in both directions (no master or slave). I...
by nsilva
20 Jul 2014 01:55
Forum: mikroC PRO for PIC General
Topic: Problem with external module
Replies: 1
Views: 862

Problem with external module

Hi,

I'm trying to solve a problem. After creating my project, I decided to divide it into several modules, however there is an error that I could not solve:
Unresolved extern 'EEPROM_Read_Integer' and Unresolved extern 'SaveData'.

Any tips?

Thank you.
by nsilva
14 Jun 2012 18:57
Forum: mikroC PRO for PIC General
Topic: Auto set pin as input or output
Replies: 3
Views: 1358

Re: Auto set pin as input or output

want to implement an option that set automatically the pins. What exactly does that means? I want to handle only one #define directive. Changing this directive, the pin must also set the mode (input or output) Today I do so with three lines of code #define, I would do this with a line to minimize p...
by nsilva
12 Jun 2012 12:43
Forum: mikroC PRO for PIC General
Topic: Auto set pin as input or output
Replies: 3
Views: 1358

Auto set pin as input or output

Hi, Hi, I'm trying to organize my projects and want to implement an option that set automatically the pins. I tried to implement the following code, but it did not work. Does anyone have any suggestions? #declare Main_Relay PORTA.F0 // output #declare Sensor PORTB.F0 // input main() { (&Main_Relay |...
by nsilva
22 Feb 2012 02:20
Forum: mikroC PRO for PIC General
Topic: Constant
Replies: 2
Views: 1269

Re: Constant

Valeu Mario!
by nsilva
20 Feb 2012 13:28
Forum: mikroC PRO for PIC General
Topic: Constant
Replies: 2
Views: 1269

Constant

Hi,

I have a constant declaration.
It is possible to visualize the result in the editor MikroC pro?

Below the code:

#define R_1 220000.0
#define R_2 220.0
#define R_3 10000.0

const float gain = (((R_1*R_3)/(R_1+R_3))+R_2)/R_2;

Thank you.
by nsilva
29 Apr 2011 14:02
Forum: mikroC PRO for PIC General
Topic: union
Replies: 8
Views: 1951

Re: union

I changed the optimization level of 4 to 0 and it generated the code! --------------------------------------------------------------------- typedef union { int a; char b; }Tunion; void main() { Tunion Teste; Teste.a=1000; Teste.b=2; } -----------------------------------------------------------------...
by nsilva
29 Apr 2011 13:54
Forum: mikroC PRO for PIC General
Topic: union
Replies: 8
Views: 1951

Re: union

Are set.
The only assembly code generated is this:

_main:

;Ponteiro.c,6 :: void main() {
;Ponteiro.c,12 :: }
GOTO $+0
; end of _main
by nsilva
29 Apr 2011 13:40
Forum: mikroC PRO for PIC General
Topic: union
Replies: 8
Views: 1951

Re: union

I compiled this code in mikroC pro version 4.60.
I am simulating the pro mikroC, but this code does not generate code in assembly.
Note that after compiling, the code does not exist in asm.
by nsilva
29 Apr 2011 12:45
Forum: mikroC PRO for PIC General
Topic: union
Replies: 8
Views: 1951

union

Hi,
This code does not work. Someone can tell me why?
-------------------------------------------------------------
typedef union {
int a;
char b;
}Tunion;

void main() {
Tunion Teste;

Teste.a=100;
Teste.b=2;

}
by nsilva
12 Apr 2011 15:25
Forum: mikroC PRO for PIC General
Topic: Function "EEPROM_Read_Long(unsigned char ADD)"
Replies: 4
Views: 1826

Function "EEPROM_Read_Long(unsigned char ADD)"

Hi, I'm needing to make a function for reading EEPROM. The function should read 4 eeprom addresses and returns a long type. I tried to do in asm but did not work. Do you have any tips? Thanks. _______________________________________________________________________________________________________ Thi...
by nsilva
06 Apr 2011 00:15
Forum: mikroC General
Topic: Function "EEPROM_Read_Long(unsigned char ADD)"
Replies: 1
Views: 1185

Function "EEPROM_Read_Long(unsigned char ADD)"

Hi,

I'm needing to make a function for reading EEPROM. The function should read 4 eeprom addresses and returns a long type. I tried to do in asm but did not work. Do you have any tips?

Thanks.
by nsilva
28 Oct 2010 13:31
Forum: mikroC General
Topic: Remote Control
Replies: 1
Views: 1310

Remote Control

How can I set the bit 31 of a variable type unsigned long. -------------------------------------------------------- unsigned long code; unsigned char i; void main(){ for(i=0;i<=31;i++){ if (PORTB.F0==1) code.F31=1; else code.F31=0; code=code >> 1; } } ------------------------------------------------...
by nsilva
26 Oct 2010 13:56
Forum: mikroC General
Topic: Example USB
Replies: 1
Views: 1284

Example USB

Example USB.
I'm using the example of help to make my first USB communication, but is not working. How should I set the configuration bits?

Thanks.
by nsilva
25 Mar 2009 19:04
Forum: mikroC General
Topic: EEPROM - This code doesn't work properly
Replies: 5
Views: 2221

drdoug wrote:Why not use the built in Eeprom functions?

this routine should be high perfomance (high speed, error control and use low memory)

Go to advanced search