I don't think a couple of the responders to date have understood the question. As I understand it the OP is asking about writing themselves a cheque for cash and presenting it at their own bank. The cheque's not going to bounce, the bank won't release the funds without checking the balance.
And, no, there's no legal limit other than the value in the bank account. The bank may have a policy of its own though or require notice. On occasion I take a cheque to the bank when we need more cash float (business account). If it's anything more than a couple of hundred pounds they tend to want a few hours notice by phone and I imagine it if was thousands they may potentially want at least a day's notice.