User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
DaniWeb is a massive community of 373,570 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,846 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Showing results 1 to 40 of 252
Search took 0.02 seconds.
Posts Made By: Colin Mac
Forum: Assembly 1 Day Ago
Replies: 3
Views: 98
Posted By Colin Mac
Re: Control Many LED's PWM

Some 18F's have multiple PWM outputs.

I'm sure you could also implement it in software using interrupts. If you can generate PWM on
one pin, you can do the inverse on another.
Forum: Assembly 1 Day Ago
Replies: 3
Views: 98
Posted By Colin Mac
Re: Control Many LED's PWM

There's free versions of compilers for writing in other languages like C and Basic which come with libraries. If you used a few PICs, this wouldn't be difficult I wouldn't think. PICs can come with...
Forum: Assembly 6 Days Ago
Replies: 4
Views: 173
Posted By Colin Mac
Re: 7 segment countdown from 99 with atmel 89s51??

Create a variable for units and a variable for tens.
Decrement the units variable, then pass each to a subroutine which checks its value and sends out the particular code. If the units variable is...
Forum: Assembly 11 Days Ago
Replies: 1
Views: 267
Posted By Colin Mac
Re: Silrtos port on 8051

http://forum.allaboutcircuits.com/showthread.php?t=12948
When you post your question all over the internet, people don't know what answers you've been given and then waste their time by giving the...
Forum: C 11 Days Ago
Replies: 23
Views: 523
Posted By Colin Mac
Re: help

The only potential problem you can be sure about is that 'boolean' isn't a standard type.
Forum: Computer Science and Software Design 20 Days Ago
Replies: 5
Views: 314
Posted By Colin Mac
Re: writing code to manipulate data from sonar sensors

This is one module for a particular application.
http://www.robotstore.com/store/product.asp?pid=817&catid=1600

Maybe it's just the transducers you need...
Forum: C 22 Days Ago
Replies: 8
Views: 241
Posted By Colin Mac
Re: Unable to delete compiled programs?

reboot into safe mode and delete it.
Forum: Assembly 24 Days Ago
Replies: 6
Views: 420
Posted By Colin Mac
Re: maze solving and bicycle speed

See the rules. The purpose of these forums is to give ideas and explain how to do things, not do people's work for them.
Forum: Assembly 25 Days Ago
Replies: 6
Views: 420
Posted By Colin Mac
Re: maze solving and bicycle speed

Do you have a question you want to ask?
It's not clear what you want to know.
Forum: Assembly 25 Days Ago
Replies: 6
Views: 420
Posted By Colin Mac
Re: maze solving and bicycle speed

Those aren't questions.
Forum: C 31 Days Ago
Replies: 5
Views: 476
Posted By Colin Mac
Re: How to create an MP3 player.

http://www.teuthis.com/html/daisy_mp3.html
Unless you mean a player in software?
Forum: C++ 32 Days Ago
Replies: 2
Views: 353
Posted By Colin Mac
Re: How do you divide without using division/multiplication?

Division is repeated subtraction.
6/3 = 2.
3 can be subtracted from 6 twice, until you're left with zero. Which explains why dividing by 0 is infinity.
Multiplication is simply repeated...
Forum: C 32 Days Ago
Replies: 7
Views: 316
Posted By Colin Mac
Re: C to Hex

The AT89 series aren't part of the AVR family Jishnu. I know CodeVision AVR doesn't support that device at least.
Forum: C 32 Days Ago
Replies: 7
Views: 316
Posted By Colin Mac
Re: C to Hex

Keil has an evaluation compiler. It's limited to 2K of object code.
https://www.keil.com/demo/eval/c51.htm
SDCC also targets the 8051
http://sdcc.sourceforge.net/
Forum: Assembly 33 Days Ago
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

The L293D has diodes, you don't need extra. See (http://www.ikalogic.com/art_pics/wfr2/l293d.jpg).
I don't know about the PT2262.
There is a simpler design for a 4-bit RF Tx/Rx halfway down the...
Forum: Assembly 34 Days Ago
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

There's no part no. shown for the RF transmitter module. The datasheet for the encoder shows it interfaced to a transmitter you must build. Are you building the transmitter yourself? The IC in your...
Forum: Assembly Jun 17th, 2008
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

PIC memory.

According to the PIC16F84A data sheet, it has 68 bytes of general purpose RAM and 1K of program code.

I don't use that micro. It's all in the link I gave you if you read it.

Why is...
Forum: Assembly Jun 16th, 2008
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

Taking the simplest case, say your car only moves forwards and backwards. For every command you send, you store the values in memory, and your car moves for a certain time for each.

When you send...
Forum: Assembly Jun 16th, 2008
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

Read the tutorial I linked. It explains how to move a port value to a register.

Store the value on an input port to memory. Compare the value on the port to others. Then send a certain value to an...
Forum: Assembly Jun 14th, 2008
Replies: 18
Views: 1,189
Posted By Colin Mac
Re: self-learning remote control car

After you read the command, it would be a case of one instruction to move a value into an address or a register. Why not spend a day at this...
Forum: Assembly Jun 12th, 2008
Replies: 4
Views: 384
Posted By Colin Mac
Re: urgent help needed regarding assembly

Download MPLAB from Microchip's website. Then go over your course notes. If they're not good enough, google for a tutorial.
Forum: C Jun 8th, 2008
Replies: 9
Views: 407
Posted By Colin Mac
Re: Adding sound/midi to C

Actually, you don't need mmsystem.h and that pragma. You can add winmm.lib as an additional dependency.
Forum: C Jun 8th, 2008
Replies: 9
Views: 407
Posted By Colin Mac
Re: Adding sound/midi to C

#include <windows.h>
#include <mmsystem.h>
#include <stdio.h>
#pragma comment(lib, "winmm.lib")

int main()
{

PlaySound( TEXT("C:\\WINDOWS\\.file_store_32\\sound0.wav"), NULL, SND_FILENAME |...
Forum: C Jun 8th, 2008
Replies: 9
Views: 407
Posted By Colin Mac
Re: Adding sound/midi to C

You can use the Beep() function from the Win32 API.
Beep(82, 600);
That will sound at 82Hz for 600ms.
You can use the PlaySound() function also from Win32 to play a wave file.
You need to include...
Forum: C Jun 8th, 2008
Replies: 9
Views: 407
Posted By Colin Mac
Forum: C Jun 7th, 2008
Replies: 9
Views: 584
Posted By Colin Mac
Re: inserting sleep in VC++

It doesn't matter. There's 1000 milliseconds in a second. If you want 5 seconds then you'd pass 5000 for example.
Forum: C Jun 1st, 2008
Replies: 15
Views: 673
Posted By Colin Mac
Re: how to make typing tutor software in c

The default position for a person's fingers are ASDF with the left hand
and JKL; with the right hand. All other keys
are reached from there, so you can start by making the user learn off those keys...
Forum: C++ May 29th, 2008
Replies: 3
Views: 185
Posted By Colin Mac
Re: Poker Game? ..Questions

Yes. You'd need to limit rand to the amount of cards in a deck.
You'd typically use a switch statement instead of the if/else's there. You'll need a for loop to check if the card has already been...
Forum: C May 28th, 2008
Replies: 7
Views: 379
Posted By Colin Mac
Re: Recursion Question. If anyone Can help me

Maybe not. I'd recommend taking initiative even so. It's how students stand out from the rest and it shouldn't be difficult.
http://www.purplemath.com/modules/exponent2.htm
Forum: C May 19th, 2008
Replies: 20
Views: 790
Posted By Colin Mac
Re: Variable (global and local)

Basically, why use global variables when they aren't necessary. You have tighter control over local variables. You decide what sees them.

Some situations I find global variables are useful, like in...
Forum: C May 17th, 2008
Replies: 17
Views: 589
Posted By Colin Mac
Re: CMD + C

You can do this to run programs from a particular place:

system("c:\\folder\\prog.exe");
Forum: C May 17th, 2008
Replies: 17
Views: 589
Posted By Colin Mac
Re: CMD + C

Your syntax is fine. Run this and check.
#include <stdio.h>

int main()
{
FILE *fp=fopen("c:\\documents and settings\\test.txt","w");
fputs("test", fp);
fclose(fp);
return 0;
}
Forum: C May 17th, 2008
Replies: 9
Views: 534
Posted By Colin Mac
Re: Problem with CodeBlock Compiler

It doesn't have anything specific. Just don't use anything that isn't standard C.
Forum: C May 13th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

The question in relation to uCs is answered here if you're interested.
http://www.electro-tech-online.com/micro-controllers/25846-best-programming-language.html?highlight=assembly
Forum: Geeks' Lounge May 11th, 2008
Replies: 7
Views: 331
Posted By Colin Mac
Re: Happy Mothers Day!!

Gave me a fright there for a minute. We celebrate it on a different day.
Forum: C May 11th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

We've establised he would be better off learning C. I've wen't one step further and gave my
opinion there isn't much point in learning assembly, unless you're interested providing we're talking...
Forum: C May 11th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

You agree we can be serious 8051 programmers and not ever learn the instruction set? If so, could you explain how to create a delay of exactly 20us in Keil C for the 8051, if my two timers are...
Forum: C May 10th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

I don't disagree if x86 assembly is the question. I don't see many reasons other than interest why people program those animals in assembly.
Forum: C May 10th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

Lastly, my brother programs PICs as part of his job. I hang out in micro forums and see nothing but assembly code. To be fair I don't know if assembly is used more, I just have reason to believe...
Forum: C May 10th, 2008
Replies: 23
Views: 958
Posted By Colin Mac
Re: Learn C as a second language?

When debugging embedded systems, logic analyzers display timing diagrams, hex or in the good ones asm code. Sometimes you need to check your hex file for errors. Sometimes you need to create delays...
Showing results 1 to 40 of 252

 
All times are GMT -4. The time now is 7:40 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC