Welll....i put one LED in 16F628A pin 2 (RA3).

And "touch" the source code:


include 16f628a                       -- Micro a usar
pragma target OSC INTOSC_NOCLKOUT     -- Oscilador interno
pragma target clock 4_000_000         -- Frecuencia del oscilador
pragma target WDT  disabled           -- WDT off
pragma target LVP  disabled           -- no low voltage programming
pragma target MCLR internal           --

enable_digital_io()                   -- Todos los pines como I/O digitales

-- Defino todo lo relacionado con el LCD
const byte LCD_ROWS    =  2           -- LCD de dos lineas
const byte LCD_CHARS   =  16          -- y 16 caracteres por linea

var   bit  lcd_en        is  pin_A1   -- Pin E del LCD
var   bit  lcd_rs        is  pin_A0   -- Pin RS del LCD
var   byte lcd_dataport  is  portB_high  -- 4 data pins
var   bit LED1           is  pin_A3     -- LED.....0=LED on ; 1=LED off

pin_A0_direction       = output
pin_A1_direction       = output
pin_A3_direction       = output
portB_high_direction   = output

include lcd_hd44780_4                 -- Incluyo la libreria del LCD
lcd_init()                            -- e inicializo el controlador del LCD

include delay                         -- Incluyo la libreria de las demoras

delay_1ms(500)
lcd_clear_screen()

forever loop
    LED1 = 0
    delay_1ms(200)
    LED1 = 1
    delay_1ms(200)
end loop



then, compile and send the HEX file to PIC. The (dammed) LED remains always
off :(

The PIC is NOT running. :(
--------------------------------------------------------------------------------------------------------------------------
Ariel Palazzesi
*Web* <http://www.ucontrol.com.ar%20> y
*Foro*<http://www.ucontrol.com.ar/forosmf/index.php>

*“Si cualquier habilidad que aprende un niño será obsoleta antes de que la
use, entonces, ¿qué es lo que tiene que aprender? La respuesta es obvia: La
única habilidad competitiva a largo plazo es la habilidad para aprender*“.
Seymour Papert



On Wed, Jan 19, 2011 at 7:39 PM, Ariel Palazzesi
<[email protected]>wrote:

> Hello Joep!
>
> I chek pint by pin with the tester, and all look ok. But.....not run ;)
>
> In a few moment put one led in one pin I/O, and blink it. If not
> blink...the PIC are not running.
>
>
> (sorry for my english!)
>
>
> --------------------------------------------------------------------------------------------------------------------------
> Ariel Palazzesi
> *Web* <http://www.ucontrol.com.ar%20> y 
> *Foro*<http://www.ucontrol.com.ar/forosmf/index.php>
>
> *“Si cualquier habilidad que aprende un niño será obsoleta antes de que la
> use, entonces, ¿qué es lo que tiene que aprender? La respuesta es obvia:
> La única habilidad competitiva a largo plazo es la habilidad para aprender
> *“. Seymour Papert
>
>
>
> On Wed, Jan 19, 2011 at 7:22 PM, Joep Suijs <[email protected]> wrote:
>
>> Hi Ariel,
>>
>> Your program looks okay to me (although I am not familiar with the
>> internal oscillator). So most likely the issue is in the hardware or
>> the oscillator.
>> Can you blink a led with this pic. In other words: are you sure the
>> pic running and approximately at the right speed?
>>
>> > Obviusly, the LCD module are conected like the source code.
>> This is not as obvious unless you checked this. I usually do this by
>> giving a subsquent high puls on each of the 6 pins used, followed by
>> an extra delay to mark the start of the sequence. Make sure the proper
>> signal is at each pin of the lcd. Lines may be crossed, not connected
>> or shorted. Use a slow pulse (0.5 sec or so) when you use two leds to
>> verify (you need two to check if sequence is okay) or fast when you
>> have access to a dual trace scope.
>>
>> Joep
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "jallib" group.
>> To post to this group, send email to [email protected].
>> To unsubscribe from this group, send email to
>> [email protected]<jallib%[email protected]>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/jallib?hl=en.
>>
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to