My problem is simply lack of any experience at all. I have got the 8048 board working and can write to my pic chip using the example supplied by velleman (led one), however I wanted to use mikrobasic to write my code in and just simply cannot get the pic to work using even the simplest of code (including the in built example from mikrobasic). Is there anyone else out there doing the same that could help?
I use MikroBasic all the time with the Velleman 8048
What code were you trying to use?
In my beginning time I made the obvious beginners errors:
- not setting the configuration word properly (to be set in the compiler – I think to be set in “Edit Project”)
- not disabling the comparator when I wanted to use pins myself (to be done in your initialisation code)
Perhaps youve made the same mistakes? Can we have a look into your code?
'(*
’ * Project name:
’ led_blinking
’ * Copyright:
’ © mikroElektronika, 2005 - 2006
’ * Revision History:
’ 20050312:
’ - initial release.
’ * Description:
’ This code demonstrates blinking of diodes connected on PORTB.
’ Diodes go on and off each second.
’ * Test configuration:
’ MCU: PIC16F877A
’ Dev.Board: EasyPIC4
’ Oscillator: HS, 8.000 MHz
’ Ext. Modules: None
’ SW: mikroBasic v5.0 or higher
’ * NOTES:
’ None
’ *)
program Led_blinking
main:
TRISB = 0 ’ Configure pins of PORTB as output
PORTB = %11111111 ’ Turn ON diodes on PORTB
while true
PORTB = not PORTB ’ Toggle diodes on portb
delay_ms(1000)
wend
end.
The compiler i am trying to use is the one that came with the velleman install MPASM, and I just keep getting a DOS error: file not found??
I got the same message when I tried to open files in the wrong place. For creating and editing they must be opened in Notepad.