sto progettando un sensore di livello con dei sensori che fungono da interruttori chiusi quando il livello sale
http://www.futurashop.it/allegato/8220- ... Vt=&d=5,00
il problema e che quando mando un input nel PIC dai sensori non mi fa nessuna operazione, invece quando gli mando un segnale da un normale alimentatore funziona perfettamente.
sulla breadboard non avevo avuto questi problemi, invece ora sul circuito stampato non va.
vi lascio il progetto e il programma se mi riuscite a dire il motivo del problema vi sarei molto grato
il programma è stato compilato in microbasic
- Codice: Seleziona tutto
program SENSORE_DI_LIVELLO
dim LCD_D6 as sbit at RB4_bit
LCD_D7 as sbit at RB5_bit
LCD_RS as sbit at RB0_bit
LCD_EN as sbit at RB1_bit
LCD_D4 as sbit at RB2_bit
LCD_D5 as sbit at RB3_bit
LCD_RS_Direction as sbit at TRISB0_bit
LCD_D7_Direction as sbit at TRISB5_bit
LCD_D4_Direction as sbit at TRISB2_bit
LCD_D5_Direction as sbit at TRISB3_bit
LCD_D6_Direction as sbit at TRISB4_bit
LCD_EN_Direction as sbit at TRISB1_bit
main:
ADCON1=$87
TRISa=1
TRISB=0
trisc=1
PORTd=0
PORTB=0
portc=0
Lcd_Init()
Lcd_Cmd(_LCD_CURSOR_OFF)
Lcd_Cmd(_LCD_CLEAR)
lcd_out(1,1,"Recipiente1")
lcd_out(2,1,"Recipiente2")
lcd_out(1,14,"/2")
lcd_out(2,14,"/2")
while(1)
if porta=0 then
lcd_out(1,13,"0")
else if porta=2 then
lcd_out(1,13,"1")
else if porta=6 then
lcd_out(1,13,"2")
end if
end if
end if
if portc=0 then
lcd_out(2,13,"0")
else if portc=2 then
lcd_out(2,13,"1")
else if portc=6 then
lcd_out(2,13,"2")
end if
end if
end if
if porta=6 then
if portc<6 then
portb.7=1
else
portb.7=0
end if
else
portb.7=0
end if
delay_ms(100)
wend
end.

Elettrotecnica e non solo (admin)
Un gatto tra gli elettroni (IsidoroKZ)
Esperienza e simulazioni (g.schgor)
Moleskine di un idraulico (RenzoDF)
Il Blog di ElectroYou (webmaster)
Idee microcontrollate (TardoFreak)
PICcoli grandi PICMicro (Paolino)
Il blog elettrico di carloc (carloc)
DirtEYblooog (dirtydeeds)
Di tutto... un po' (jordan20)
AK47 (lillo)
Esperienze elettroniche (marco438)
Telecomunicazioni musicali (clavicordo)
Automazione ed Elettronica (gustavo)
Direttive per la sicurezza (ErnestoCappelletti)
EYnfo dall'Alaska (mir)
Apriamo il quadro! (attilio)
H7-25 (asdf)
Passione Elettrica (massimob)
Elettroni a spasso (guidob)
Bloguerra (guerra)







