Search found 37 matches

by Superdude_123
11 Oct 2013 03:51
Forum: mikroC PRO for PIC General
Topic: Button Press and LCD Out
Replies: 1
Views: 971

Button Press and LCD Out

My code doesn't seem to work. I'm sure it's in my use of the Button library feature. Is there a way to look specifically at RA0 for button presses? // Lcd module connections sbit LCD_RS at LATB4_bit; sbit LCD_EN at LATB5_bit; sbit LCD_D4 at LATB0_bit; sbit LCD_D5 at LATB1_bit; sbit LCD_D6 at LATB2_b...
by Superdude_123
26 Sep 2013 18:29
Forum: mikroC PRO for PIC General
Topic: PIC16 UART question
Replies: 2
Views: 1491

Re: PIC16 UART question

When your using the USART terminal, check what you have for the New Line Settings. This value is what is sent after your string of text to the chip. Based on what I see in your code, your expecting the character 2. I would suggest you try it with "\r\n" and have it set to CR+LF. You might also want ...
by Superdude_123
26 Sep 2013 18:23
Forum: mikroC PRO for PIC General
Topic: Equivalence for a LAT based chip of Blink LED?
Replies: 1
Views: 938

Equivalence for a LAT based chip of Blink LED?

On the 16f877a, this simple code works fine: void main() { // set PORTB to be digital output TRISD=0b00000000; //configure portb as output PORTD = 0b00000000; // Turn OFF LEDs on PORTB while(1) { PORTD = 0b00000000; Delay_ms(1000); PORTD = 0b00000001; Delay_ms(1000); PORTD = 0b00000000; } } What wou...
by Superdude_123
26 Sep 2013 18:18
Forum: mikroC PRO for PIC General
Topic: PIC16 UART question
Replies: 2
Views: 1491

Re: PIC16 UART question

Try it putting a condition to your if statement for Data_Ready. I use == 1.
by Superdude_123
26 Sep 2013 16:07
Forum: mikroC PRO for PIC General
Topic: Variable Delay_ms ?
Replies: 1
Views: 1101

Variable Delay_ms ?

Is there a way to convert char to int and then use it as a variable delay, or should it be a for loop with the objective to delay 1 ms until it's equal to the int value?
by Superdude_123
23 Sep 2013 15:38
Forum: mikroC PRO for PIC General
Topic: Need help converting data from type char to [insert idea]
Replies: 5
Views: 1979

Re: Need help converting data from type char to [insert idea

With some trial and error, I can tell that my if statement bellow doesn't work. Could someone point to me why it doesn't work? // Lcd module connections sbit LCD_RS at LATB4_bit; sbit LCD_EN at LATB5_bit; sbit LCD_D4 at LATB0_bit; sbit LCD_D5 at LATB1_bit; sbit LCD_D6 at LATB2_bit; sbit LCD_D7 at LA...
by Superdude_123
23 Sep 2013 01:54
Forum: mikroC PRO for PIC General
Topic: Need help converting data from type char to [insert idea]
Replies: 5
Views: 1979

Need help converting data from type char to [insert idea]

In my code, after the USART data is stored to an array of type char, I would like to start using this data. I'm thinking that I need something that is in the conversion libraries but I can't seem to find something that fits my needs. Here's what I'm trying to do: I transmit by UART: A123\n My array ...
by Superdude_123
16 Sep 2013 20:57
Forum: mikroC PRO for PIC General
Topic: Unexpected characters when sending back UART data
Replies: 1
Views: 1001

Unexpected characters when sending back UART data

When I transmit data, I've manually mapped my data from the receive array to the transmit array. It seems to be working fine, however, I'm getting unexpected characters before and after my transmission. Here's the code: // Main void main() { ANSELC = 0; UART1_Init(9600); Delay_ms(100); UART1_Write_T...
by Superdude_123
07 Sep 2013 03:21
Forum: mikroC PRO for PIC General
Topic: How to convert a big array to a smaller one?
Replies: 4
Views: 2159

Re: How to convert a big array to a smaller one?

Could someone explain to me why this doesn't work? while (1) { UART1_Read_Text(NMEA, "\r", 64); // Convert xxxxxx First_Data_Set == 0; do{ if (NMEA[First_Comma] != ','){ DATA_1[First_Comma] = NMEA[First_Comma]; First_Comma++; First_Data_Set == 1; } } while(First_Data_Set == 0); DATA_1[First_Comma +1...
by Superdude_123
06 Sep 2013 15:09
Forum: mikroC PRO for PIC General
Topic: How to convert a big array to a smaller one?
Replies: 4
Views: 2159

How to convert a big array to a smaller one?

As a continuation of http://www.mikroe.com/forum/viewtopic.php?f=88&t=56212, how do I handle the following: NEMA[0] = 1 NEMA[1] = A NEMA[2] = 8 NEMA[3] = 1 NEMA[4] = , NEMA[5] = 2 NEMA[6] = B ...... and so on Where NEMA is type char, how do I convert this to (with the objective of using UART write t...
by Superdude_123
06 Sep 2013 15:02
Forum: mikroC PRO for PIC General
Topic: How to convert a big array to a smaller one?
Replies: 1
Views: 1022

How to convert a big array to a smaller one?

As a continuation of http://www.mikroe.com/forum/viewtopic.php?f=88&t=56212, how do I handle the following: NEMA[0] = 1 NEMA[1] = A NEMA[2] = 8 NEMA[3] = 1 NEMA[4] = , NEMA[5] = 2 NEMA[6] = B ...... and so on Where NEMA is type char, how do I convert this to (with the objective of using UART write t...
by Superdude_123
06 Sep 2013 14:46
Forum: mikroC PRO for PIC General
Topic: UART Problems: Could I have a bad chip, corrupt system, ...?
Replies: 3
Views: 1521

Re: UART Problems: Could I have a bad chip, corrupt system,

Hi Marina,

The problem got resolved here: http://www.mikroe.com/forum/viewtopic.php?f=88&t=56212

I think the problem was the missing '\r' on the UART text read and using LCD out instead of LCD char.

Thanks!
by Superdude_123
06 Sep 2013 01:33
Forum: mikroC PRO for PIC General
Topic: Conversions Library Help Needed
Replies: 5
Views: 2562

Re: Conversions Library Help Needed

aCkO, thank you!

Now I have to ask, where do I read up more on the "\r" thing (learning as I code here)? I didn't see this option in the uart library: http://www.mikroe.com/download/eng/docu ... ibrary.htm
by Superdude_123
06 Sep 2013 01:20
Forum: Website & Forums General Discussion
Topic: Getting Product DVD vs Downloading?
Replies: 32
Views: 399165

Re: Getting Product DVD vs Downloading?

Aleksandar, As a complete newbie to C and micro-controller programming, I rely heavily on examples and peoples previous works (forums) to learn from. To answer to question 1, I haven't touched the DVD since I installed it to my system, however, I would still like either the option to download a DVD ...

Go to advanced search