Can anyone tell whether the program is correct..

nanovate

Joined May 7, 2007
666
Pin 28 is PC6
Pin 29 is PC7
DDRC is already config'd as output

This is where you make your changes
Rich (BB code):
#define FWD 0xAA
#define REV 0x55
#define R 0x22
#define L 0x88
#define CW 0x99
#define CCW 0x66
#define STOP 0x00
#define B 0xFF
For example:

in move()

PORTC = R;

writes a '1' to PC1 and PC5 (pins 23 & 27) since 0x22 is 0010 0010

Just remap according to you schematic (or modified schematic)
 

hgmjr

Joined Jan 28, 2005
9,027
Do you have a screen in your CodeVisionAVR that looks like this? If so then check to make sure that the JTAGEN fuse is not selected.

hgmjr
 

Attachments

hgmjr

Joined Jan 28, 2005
9,027
thanks for the reply sir... i hav a new problem... how should i configure the cksel and the sut fuses for the 16mhz crystal oscillator
You should be able to consult the User's Manual for your C compiler to answer your questions on what software features are available to manage the fuses on your microcontroller. All of the recent generation of microcontrollers have these internal fuses to permit the flexibility that makes them so useful.

hgmjr
 
Top