Search found 156 matches
- 13 Apr 2023 03:00
- Forum: mikroC PRO for PIC32 General
- Topic: Help writing I2C-1 Slave Event interrupts
- Replies: 1
- Views: 802
Re: Help writing I2C-1 Slave Event interrupts
[SOLVED] - Well, partially. I got the two PIC's I am working on to talk. PIC's: PIC18F45K22 (I2C Master) PIC32MX695F512L (I2C Slave) Power: PIC18; +5V PIC32; +3V3 Extras: - Level Shifter (Adafruit 4-channel I2C-safe Bi-directional Logic Level Converter - BSS138) Issues: On the PIC32 side; What was ...
- 12 Jan 2023 07:08
- Forum: mikroC PRO for PIC32 General
- Topic: Help writing I2C-1 Slave Event interrupts
- Replies: 1
- Views: 802
Help writing I2C-1 Slave Event interrupts
Hello all, I have some code written (not complete code, just some code), and would just like a second set of eyes to advise if what direction I am headed in is okay, or needs course-correcting please :D MCU: PIC32MX695F512L Oscillators: {Primary} 20MHz resonator {Secondary} 32.768kHz resonator Clock...
- 15 Nov 2022 07:50
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Well, that's why I'm here. Trying to deal with RF12 now.The answer is obvious. Deal with RF12 or switch to another pin.
I might just have to switch to another pin.
Thanks for your input though. Much appreciated.
- 15 Nov 2022 06:09
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Test one; sbit PS2_Data at RF12_bit; sbit PS2_Clock at RF13_bit; sbit PS2_Data_Direction at TRISF12_bit; sbit PS2_Clock_Direction at TRISF13_bit; void main() { CHECON = 0x32; // Cache Control Register (Copied from LCD Library Help files) AD1PCFG = 0xFFFF; // Configure AN pins as digital I/O JTAGEN_b...
- 14 Nov 2022 01:26
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Thanks for the cfg file. I opened it up in Visual Studio to take a look. Also opened up the 'Edit Project' window, where the Configuration Registers are displayed. And have the PIC32MX5XX/6XX/7XX Family Reference Manual Section 00 PDF open to '29.0 Special Features', specifically, the DEVCFG registe...
- 13 Nov 2022 12:42
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
I just hope that particular pin isn't screwed :roll: Am not sure what you mean by mikro processor definition. In that, maybe there's still some hope of getting this show back on the road, and fixing the thing. Am going to sleep on it for now. Again, much-much appreciating your thoughts and ideas her...
- 13 Nov 2022 11:41
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Sorry, should have mentioned, the LEDs have resistors on the cathode side, in all tests thus far. So, I added two lines of code; ODCF13_bit = 1; ODCF12_bit = 1; Again, Both LED's (with resistors) anodes connected to the USB Vcc. One cathode+resistor to RF12, and the other cathode+resistor to RF13. R...
- 13 Nov 2022 11:11
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Did this; First test: Two LEDs. Anodes connected together, connected to usb female Vcc. One cathode to RF12, the other cathode to RF13. LED's light bright when both port pins are LOW. LED's low illumination (not completely off) when both port pins are HIGH. Second test: Two LEDs. Cathodes connected ...
- 13 Nov 2022 09:16
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
:lol: Yeah I noticed that when I woke up and saw your earlier reply. Fixed it up as you've suggested. Still nothing... Then I thought I was parsing the keydata wrong, for some reason, and that's why nothing is displayed upon the Lcd. So I just commented out all parsing code in the PS2 section except...
- 12 Nov 2022 22:56
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Checked the pins as per the link. All correctly assigned.
Swapped the inits as well. Still not working.
Swapped the inits as well. Still not working.
- 12 Nov 2022 13:30
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Keyboard works on the computer. It has a usb male connector. When I use it on the PIC18F45K22 with GLCD, using the PS2 Library, written in mikroBASIC, it works a treat. When I use it on the PIC32MX695F512L with LCD, using the PS2 Library, written in mikroC, it doesn't work. And gets the results I sp...
- 12 Nov 2022 11:33
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
It's an old Microsoft keyboard, and says on the back 5 volts. Besides, the PCB routes 5V to the Vcc pin. So using 3V3 would need 'surgery' on traces. I used a multimeter on the signal side of the pull-up resistors (1K resistors, just like the library help page shows), with these results; Data signal...
- 12 Nov 2022 10:42
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
I have tried the addition to the code you suggested, and the LCD displays the new text, "LCD Initialised" on the first row.
But the Keyboard presses still don't show up.
But the Keyboard presses still don't show up.
- 12 Nov 2022 09:41
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
Re: PS/2 Keyboard to LCD
Init_PIC() and Init_Vari() are procedures in the code for the PIC18F45K22, using mikroBASIC.
Init_PIC() sets up registers, ports and pins. Where Init_vari() sets up variables. They are called prior to the main loop.
Both these are not used in the code for PIC32MX695F512L, using mikroC.
Init_PIC() sets up registers, ports and pins. Where Init_vari() sets up variables. They are called prior to the main loop.
Both these are not used in the code for PIC32MX695F512L, using mikroC.
- 11 Nov 2022 23:22
- Forum: mikroC PRO for PIC32 General
- Topic: PS/2 Keyboard to LCD
- Replies: 24
- Views: 2198
PS/2 Keyboard to LCD
Hi all, I can't get anything to display on a 2x16 LCD when pressing keys on a PS/2 keyboard. And would like more experienced eyes to take a look over my code, to see if there's something I am missing please? MCU: PIC32MX695F512L Timing: (Primary) 25MHz resonator (Secondary) 32.768kHz resonator (not ...