Search found 32 matches

by Yako
14 Dec 2011 09:06
Forum: mikroC PRO for PIC General
Topic: Simple Software Question
Replies: 4
Views: 1470

Re: Simple Software Question

mstrdenz91 wrote:

Code: Select all


void Button1Click() {
      PORTB = PORTB || 0x0006;  
       //PORTB.B1 = 1;
      strcpy(Label3.Caption, "Solenoid on");
      DrawLabel(&Label3);
}

void Button2Click() {
 InitIO();
}
Hello,

What you have posted is not C code, it looks like MS Visual XXX code in part.

Kind regards,

Yako.
by Yako
14 Dec 2011 08:20
Forum: mikroC PRO for PIC General
Topic: Cheap Linear Dual Rail Tracking Power Supply
Replies: 5
Views: 1675

Re: Cheap Linear Dual Rail Tracking Power Supply

Bonca wrote:---
Sorry, I replied to a wrong place.

Bonca
No, you have come to the right place friend.

I use this compiler for all of my firmware, but not all of my projects use an MCU.
by Yako
14 Dec 2011 07:36
Forum: mikroC PRO for PIC General
Topic: How to convert char array to hex or binary
Replies: 3
Views: 2934

Re: How to convert char array to hex or binary

Difficult, resourceful, quirky and you wouldn't do it.
by Yako
13 Dec 2011 19:14
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

Interfacing an 74HC165 is actually pretty boring, but making a good video game that runs inside a one-dollar PIC using straight C code is an eye-opener. You should give it a go. Perhaps not Tetris, though, as this is just going to be so difficult to do with a few bytes of RAM on free scan lines that...
by Yako
13 Dec 2011 18:59
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

xpolhecx wrote:Oh i doubt i'm going to play with games because i have many unfinished projects :)
Arh, but how many of those projects have all been done before?

A game of Tetris using monochrome composite video would literally be a 'first' for mikroC.

No asm besides nop.
by Yako
13 Dec 2011 18:47
Forum: mikroC PRO for PIC General
Topic: asm variable declarations
Replies: 4
Views: 1758

Re: asm variable declarations

I did notice this, however I expected some form of assignment operator like Cblock or equ. i.e. INDF equ 0x0000 You are probably better off diving straight into raw Microchip assembly if you're questioning this sort of stuff. As a high-level C programmer, there is no need for it really. This is a p...
by Yako
13 Dec 2011 18:14
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

Then do a game of Tetris (my fav game of all time)

Not easy to do with a 5MIPS 2KB PIC in C, but possible none the less.
by Yako
13 Dec 2011 18:02
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

xpolhecx wrote:Sure, no problem :)
If you have some time to kill, then you can have a go at interfacing to that monochrome composite video code using another MCU.

Make a game of PONG or something.

You will save me a chore, because I need to write a demo application later on for it.
by Yako
13 Dec 2011 17:43
Forum: mikroC PRO for PIC General
Topic: Cheap Linear Dual Rail Tracking Power Supply
Replies: 5
Views: 1675

Re: Cheap Linear Dual Rail Tracking Power Supply

An 8-BIT DAC solution for controlling the output voltage:
block.jpg
block.jpg (77.43 KiB) Viewed 1659 times
Are there better options that don't impose the 80mV resolution?
by Yako
13 Dec 2011 17:40
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

xpolhecx wrote: What did you mean by that?
Keep up the good work and always make sure that what you do and or say is genuine.

No more games.
by Yako
13 Dec 2011 17:11
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

Everythink is tested before posting, of course :) The solution is not perfect and can be optimized (i guess), but it works fine for my needs :) OK three rules from hereon in. 1. Posts and technical data must be absolute genuine 2. You must know what you're doing as in like for real 3. Don't ever sm...
by Yako
13 Dec 2011 16:46
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

Bit like the old saying: "give me 100 engineers and I'll give you 100 different solutions to (n) problem"

I'll have to get some of these chips and fire them up with some code.

You're testing these solutions before posting right?

It would be nice to see everything "genuine" from now on.
by Yako
13 Dec 2011 16:26
Forum: mikroC PRO for PIC General
Topic: Problem with button library
Replies: 4
Views: 1973

Re: Problem with button library

I have done a 4-digit counter, similar to what you are trying to do. Here is some relevant code for you to have a look through: // LED 4-Digit UP / DOWN Counter with Fail safes! unsigned short buttonDown = 0; unsigned short tens = 0; unsigned short hundreds = 0; unsigned short thousands = 0; unsigne...
by Yako
13 Dec 2011 16:05
Forum: mikroC PRO for PIC General
Topic: Problem with button library
Replies: 4
Views: 1973

Re: Problem with button library

I think that you are probably better off reading the ports directly rather than using the button lib (personal subjective opinion)

Also, with your IFs, you are better off doing this:

Code: Select all

if (button01a == 1)
{
   switchONrelay01a = 1;
}
You really need to have a degree of coherency in your code.
by Yako
13 Dec 2011 15:25
Forum: mikroC PRO for PIC General
Topic: Expanding input ports with 74HC165
Replies: 21
Views: 11703

Re: Expanding input ports with 74HC165

I leave it in your capable hands.

I don't like flogging off solutions that I am unable to test, makes me look like a fool if not working.

There's nothing worse than looking like a fool.

I don't know these chips and I don't have them.

Go to advanced search