View previous topic :: View next topic |
Author |
Message |
eng.mohamedtoumi
Joined: 13 Jan 2018 Posts: 23 Location: Tun
|
|
Posted: Thu Jan 18, 2018 4:21 am |
|
|
temtronic wrote: | I'd like to see a picture of the hardware, though since the numbers are reported on a 'schematic LCD' NOT a PC, I think it's all a simulation. |
yes it is a simulation on isis proteus 8.6 sp2 ... |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19195
|
|
Posted: Thu Jan 18, 2018 5:45 am |
|
|
Read the sticky at the top of the forum.
You are wasting both our time and yours. Proteus (Isis) has fundamentally flawed models for a huge percentage of PIC peripherals. You can spend an age chasing problems, and then when you have it working, have to do the same again when you go to the real chip.... |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9081 Location: Greensville,Ontario
|
|
Posted: Thu Jan 18, 2018 6:02 am |
|
|
Well it wasn't a total waste of time.
first, he's confirmed that Proteus is 'busted ' for simulating Atmega micros as well as PICs. Guess we have to ask everytime if it's real or fake project, sigh.
I finally clued in with the numbers being on the paper LCD.
2nd, I found my Atmega box of goodies while replacing the furnace fan motor. As heat was being restored in the house (5*C brr), I cobbled PIC and Atmega for a test. In less than 2 hours I had the PIC master controlling the Atmega slave via I2C, so I KNOW it can be done....fairly easily too.
Jay |
|
|
eng.mohamedtoumi
Joined: 13 Jan 2018 Posts: 23 Location: Tun
|
|
Posted: Thu Jan 18, 2018 1:36 pm |
|
|
[problem solved] Hello thank you all for your replies ...
i made these changes for the pic code and it works correctly
Code: |
i2c_start();
i2c_write(0x10);
delay_ms(10) ;
i2c_write(mode);
delay_ms(10) ;
delay_ms(10) ;
i2c_stop(); |
The atmega code stays the same one like the previous.
As an advice just run the pic i2c slave scanner because the atmega uses a 7 bits address while the 18F uses 8 bit address this might be confusing ... |
|
|
|