microchip

Storing a 4-bit value in the middle of an 8-bit register

I need to count from 0 to 10 and store those values in binary format in ADCON0(5:2). How do I point at bit 5 of this register? Bit 5 is named ADCON0bits.CHS3. If I store a 4 bit variable to ADCON0bits.CHS3, will bits 1 - 3 be written to bits 4 - 2 of the register? Also, are there any 4 bit data types that I could use? This is all on a ...

Sending data over tcpip using Microchip's PIC18F

All of the examples in the TCPIP Demo App are built using a custom program that designs a webpage that triggers callbacks when the webpage is changed. Is it possible to get a value from a sensor every X seconds and send the data out over an HTTP POST? ...

Modbus stack for Microchip PIC

Can someone suggest an open source implementation of a Modbus RTU Slave for a Microchip PIC18 processor? I'm looking for an implementation of Modbus RTU for RS-232/RS-485, but a Modbus TCP/IP implementation would be welcome as well. ...

PIC 18 controller as serial to ethernet bridge

Hi Geeks, I am planning to use PIC18F6*** serial microntroller for my project serial-ethernet converter. Once I will put my hex code in PIC micro-controller for send recieve serial port data I will use the windows hyper-terminal and for checking the ethernet data is there any application in windows? If my question is not clear I am re...

Writing to EEPROM on PIC

Are there any PIC microcontroller programmers here? I'm learning some PIC microcontroller programming using a pickit2 and the 16F690 chip that came with it. I'm working through trying out the various facilities at the moment. I can sucessfully read a byte from the EEPROM in code if I set the EEPROM vaklue in MPLAB but I don't seem to be...

adding SSL to microchip Generic TCP server application

Hi, Has anybody upgraded the code of generic tcp server application provided by Microchip to SSL? I added new listener port to existing server socket. But then also its not TCPPutIsReady state. When I tried to connect through ssh client Tera Term its asking for username and password. But does it required for client to provide username ...

Create big buffer on a pic18f with microchip c18 compiler

Using Microchip C18 compiler with a pic18f, I want to create a "big" buffer of 3000 bytes in the program data space. If i put this in the main() (on stack): char tab[127]; I have this error: Error [1300] stack frame too large If I put it in global, I have this error: Error - section '.udata_main.o' can not fit the section. Sectio...

extracting secrets from an embedded chip

I am looking at an embedded system where secrets are stored in flash that is internal to the chip package, and there is no physical interface to get that information out - all access to this flash is policed by program code. All DMA attacks and JTAG and such are disabled. This seems to be a common locked-down configuration for system-o...

Can Microchip TCP/IP stack implements two or more clients sockets at the same time?

I need to make one device communicate with 2 servers. Is it possible with Microchip TCP/IP stack? ...

Communicating with the Pic 16F913

Here is my issue, it appears that all the communication lines for the PIC 16F913 reside on the same set of pins, this is convenient in that I don't have to sacrifice GPIO pins just to do comms, however the problem I'm having now is if I'm using the SPI on the chip, how can I send information to the RS232? The reason this issue came up,...

Microchip PIC C18 Programming File Format .COFF vs .HEX

I am developing code in the MPLAB IDE and I was wondering if it is better to program a chip using the .COFF or .HEX file generated by the compiler. I'm not sure what the difference is between the two and I am assuming they will both perform the same job. ...

Microchip's MPLAB IDE equivalent for 8086 assembly

I always wanted to learn 8086 assembly but was (and am) a little confused on where to start. We are learning PIC16F690 at the moment in school and I'm good at it. So I guess I can give 8086 a try. I'm wondering is there an IDE for 8086 like MPLAB IDE where in it you can write code and execute instructions line by line and watch memory, r...

Implementing security on the chip level

With Intel's recent purchase of a well known security company, I'm starting to think about what software w/could be more secure on a chip level. Examples I've come up with are: Random number generation Encryption Memory protection But is hardware level security any more secure than software based security? ( I would assume garbage i...

How does TickGetDiv256() works?

Hi I wonder if anyone could give me an example how the TickGetDiv256(); function works. It came from Microchip in Tick.c Im trying to count for 2 houre's, if fullfilled an engine will be stopped. I could might use "threshold = tick + TICKS_PER_SECOND * 60;" function. But I dont know if it would be good to use it for this amount of time...

PIC board with a webserver

Can anyone please suggest a small PIC board which has a web server built into it and can be programmed to handle ftp connections? ...

Why doesn't this compile in C18?

I'm trying to compile the following code using the MPLAB C18 v3.36 compiler. Compiler returns a syntax error on 'char rij;'. But when i put char rij; a line earlier (before TRISA = ...), it compiles ... void setup(void) { TRISD = 0b00000000; TRISA = 0b00000000; char rij; for (rij = 0; rij<ROWS; rij++) { red_byte_array[rij]=0; g...