Bernhard Rieman
Newbie level 1
- Joined
- Jan 3, 2014
- Messages
- 1
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1
- Activity points
- 18
hii
im working on wireless transsmission i have to connect to pics 16f877a wirelssly and my probleme is i can't find tx/rx 433 on proteus,and when i lincked with file it didn't ,anyway i need help with coding corret me please and thanks
every help is appreciated
im working on wireless transsmission i have to connect to pics 16f877a wirelssly and my probleme is i can't find tx/rx 433 on proteus,and when i lincked with file it didn't ,anyway i need help with coding corret me please and thanks
every help is appreciated
Code C - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 //////////////////////////////// receiving code sbit LCD_RS at RB2_bit; sbit LCD_EN at RB3_bit; sbit LCD_D4 at RB4_bit; sbit LCD_D5 at RB5_bit; sbit LCD_D6 at RB6_bit; sbit LCD_D7 at RB7_bit; sbit LCD_RS_Direction at TRISB2_bit; sbit LCD_EN_Direction at TRISB3_bit; sbit LCD_D4_Direction at TRISB4_bit; sbit LCD_D5_Direction at TRISB5_bit; sbit LCD_D6_Direction at TRISB6_bit; sbit LCD_D7_Direction at TRISB7_bit; // Initialize Receiver sbit MANRXPIN at RC0_bit; sbit MANRXPIN_Direction at TRISC0_bit; sbit MANTXPIN at RC1_bit; sbit MANTXPIN_Direction at TRISC1_bit; char error, ErrorCount, temp; void main() { TRISC=1; ADCON1 = 6; CMCON = 7 ; PORTC=0; TRISA=0; Lcd_Init(); Lcd_Cmd(_LCD_CLEAR); Lcd_Cmd(_LCD_CURSOR_OFF); Man_Receive_Init(); while(1) { Lcd_Cmd(_LCD_FIRST_ROW); // Move cursor to the 1st row do { temp = Man_Receive(&error); // Attempt byte receive if (error) { // If error occured Lcd_Chr_CP('j'); // Write question mark on LCD ErrorCount++; // Update error counter if (ErrorCount > 20) { // In case of multiple errors temp = Man_Synchro(); // Try to synchronize again //Man_Receive_Init(); // Alternative, try to Initialize Receiver again ErrorCount = 0; // Reset error counter } } else { // No error occured if (temp=='A') // If "End" byte was received(see Transmitter example) { Lcd_Out(1,1,"detection"); Delay_ms(500); } // do not write received byte on LCD } if(temp=='B'){Lcd_Out(1,1,"pas detection");Delay_ms(500); } } while (temp != 0x0E) ; // If "End" byte was received exit do loop } }
Last edited by a moderator: