Seriously? No blinking led, and yet you are going for a 6 DOF robot arm
.
Here is your blink led for your 18f4431 on an olimex board (led on PortA,0), in
Great Cow Basic. Please start a different thread on the language/compiler wars, so I can avoid it.
You seem to be contradicting yourself, you have two 18f4431's and then you don't? Software pwm may work for you, or it may not. This chip and other variations like it give you more 'outs' if a hardware pwm becomes desirable.
I doubt many people have plowed the course you have set yourself on, so therefore little feedback. It may very well be a trial and error situation, unless you can latch onto a someone's completed project, and learn from that. Don't worry about how many chips and boards until the prototype is finished, especially if they are already at hand. When you have proven the concept, the finished product will reveal itself
.
Using the motor control module has been a back burner project for some time now, and will continue to be.
Code:
'Chip model
#chip 18f4431,20
#config WDTEN=Off
#define Led PortA.0
dir PortA.0 out
Main:
Set Led On
wait 1 s
Set Led Off
wait 1 s
Goto Main
Simple a-d program.
Code:
'Chip model
#chip 18f4431,20
#config WDTEN=Off, MCLRE=On
'Setup 4 bit LCD
#define LCD_IO 4
#define LCD_DB4 PORTB.0
#define LCD_DB5 PORTB.1
#define LCD_DB6 PORTB.2
#define LCD_DB7 PORTB.3
#define LCD_RS PORTB.4
#define LCD_RW PORTB.5
#define LCD_Enable PORTB.6
dir PortA.1 in
Main:
cls
LCDWord ReadAD10(AN1)
wait 50 10ms
Goto Main